Sergio Aguero called time on his playing career at a press conference in Barcelona after being recently diagnosed with a cardiac arrhythmia - an irregular heartbeat.
The 33-year-old was taken to hospital after Barca's 1-1 draw with Alaves in October after experiencing chest pains and breathing difficulties during the game.
The Argentine only made five appearances for the Catalan club following his summer move from Manchester City on a free transfer.
Aguero - who didn't make his debut until October due to a calf injury - scored one goal in a 2-1 defeat to Real Madrid.
He announced the news at the Nou Camp where City manager Pep Guardiola was among those in attendance.
An emotional Aguero said: "This is to tell you that I have decided to stop playing professional football.
"It is a very tough moment, but I am happy with the decision I have taken. First comes my health.
"I took the decision for the problems I had a month and a bit ago.
"I was in good hands of the doctors who told me the best was to stop playing.
"I took the decision about a week ago, I did everything possible to keep hope alive, but there was not much. I am very proud for my career, very happy.
"I always dreamed of playing football, thankful to everyone who has helped me, at Atletico, at City, I am very grateful because I was treated very well. And the people at Barca have been incredible with me.
"I wanted to come to the best team in the world, but things happen for a reason, and they have treated me very well here.
"Also, I am grateful to the Argentina national team, and everybody here in this moment, my family."
Aguero scored 184 goals in 275 Premier League appearances to become City's all-time top scorer after arriving from Atletico Madrid in 2011.
He famously scored an injury-time winner against QPR in 2012 to secure the first of five league titles and he also won the FA Cup and six League Cups during his time at the Etihad Stadium.
Aguero scored 41 goals in 101 games for Argentina, played at three World Cups, and was also part of the Copa America winning squad earlier this year.