“I have decided to stop playing professional football. It is a very hard moment but I am happy with my decision. My health comes first,” said Aguero.
Aguero, who enjoyed 10 highly successful years at Manchester City before leaving at the end of last season.
He signed a two-year deal with Barcelona but had made just five appearances, scoring one goal against Real Madrid, before being taken to hospital with “chest pains” after a match at home to Alaves in October.
“I took this decision because of problems I had a bit more than a month ago. I was in good hands with the doctors who also did their best and told me the best thing to do was stop playing,” he said at the press conference at the Camp Nou, which was attended by his Barcelona team-mates.
Manchester City manager Pep Guardiola and director of football Txiki Begiristain were also both in attendance at the press conference.
“I did everything possible to keep the hope alive but there wasn’t much hope.”
Aguero, commonly known by his nickname ‘Kun’, began his career at Independiente in his native Argentina before moving to Europe in 2006 to sign for Atletico Madrid.
He won the Europa League during his time with the Spanish side and then moved to City in 2011.
Aguero left the Etihad Stadium a decade later as their all-time leading scorer with 260 goals, the most famous being his injury-time strike against Queens Park Rangers in May 2012 which won the Premier League title.
“I am very proud of the career I have had,” he added.
“Everyone knows about the goal I scored for City against Queens Park Rangers to win my first Premier League, but there have been many great moments.”
Aguero’s retirement comes at the end of a year marked by the collapse of Denmark’s Christian Eriksen, who suffered a heart attack playing for his country against Finland at Euro 2020 in June.
Eriksen, of Inter Milan, was later fitted with a pacemaker but is not permitted to play in Serie A as a result.
Other players have brought the curtain down early on their careers due to similar problems — France World Cup winner Lilian Thuram retired aged 36 in 2008 after a medical at Paris Saint-Germain revealed a heart condition.
Aguero’s retirement means he will miss out on the chance to represent Argentina at next year’s World Cup in Qatar but he did help his country win the Copa America in Brazil earlier this year, collecting his 100th cap during that tournament.
He won five Premier League titles in total with City, as well as one FA Cup and six League Cups, and is the English top flight’s all-time top-scoring foreign player.
“Sergio is quite simply the most ruthless striker in the history of the Premier League. It is extraordinary that his statistics, more reflective of two careers, are in fact those of a player whose time in the game was cut short,” said City chairman Khaldoon Al Mubarak.
Aguero, who first broke through at Independiente aged 15 in 2003, himself reflected that he was lucky to have been able to enjoy such a long and successful career before the condition was detected.
“It is positive that they detected the problem now and not before,” he said.
“I will try to be happy now outside of football and enjoy all the moments that as professional footballers we actually miss out on, going to train every day, travelling, playing.
“I will stay connected to football for sure but will try to enjoy life a bit more.”