Pacquiao made the announcement in a 14-minute video posted on his official Facebook page.
In August, the world's only eight-division champion lost a WBA welterweight world title match against Cuban Yordenis Ugas.
Pacquiao, 42, is a Philippine senator and has up to now been dividing his time between politics and fighting.
"I just heard the final bell. Boxing is over," said an emotional Pacquiao, who rose from poverty to become one of boxing's biggest box-office draws during a 72-fight career.
"I never thought this day would come as a I hang up my boxing gloves," added Pacquiao, as he thanked his fans all over the world.
Known for his blistering speed of punches, Pacquiao was widely regarded as one of the best fighters in the sport's history.
Veteran promoter Bob Arum in 2010 said he was unmatched, and rated him better than Muhammad Ali. "His left and right hand hit with equal power and that is what destroys his opponents," Arum told Reuters.
The 'Pac-Man' had his first pro bout age 16 and would go on to win world titles at flyweight up to light middleweight and fought some of boxing's biggest names, including a 20015 defeat against Floyd Mayweather - the biggest payday in the sport's history.
He retires with a professional record of 62 wins (39 KO), eight defeats and two draws.
“Boxing has always been my passion, I was given the opportunity of representing the Philippines, bringing fame and honour to my country every time I entered the ring," Pacquiao added.
“I am grateful for all my accomplishments and opportunity to inspire the fans.”
Growing up in the south of the Philippines, Pacquiao's family was dirt-poor, prompting him to do odd jobs to survive. He stowed away on a boat to the capital Manila as a teenager, where he started competitive boxing.
Pacquiao was among the staunchest allies of Philippines President Rodrigo Duterte, backing the leader's bloody war on drugs and his bid to reintroduce the death penalty.
But their political ties soured after Pacquiao criticised Duterte's friendly relationship with China and corruption in the government. In July, he was ousted as president of the country's ruling political party.
Pacquiao started his political career with failed congressional run in 2007. He won a seat at the lower house of congress in 2010, representing the southern Sarangani province.
The two-term congressman was elected for a six-year term in the upper chamber in 2016.