Pele has left hospital following a 12-day stay at an intensive care unit at Sao Paulo’s Albert Einstein Hospital.
He had previously left the hospital after the removal of a colon tumour, but was readmitted following acid reflux issues.
The 80-year-old, who won three World Cups with Brazil, will now continue his recuperation at home.
The ex-footballer posted video footage of him throwing a ball in hospital as part of his rehabilitation.
Posting on Instagram, his daughter Kely Nascimento wrote: “Bye bye Brazil. I loved including my Father’s recovery on my social media. It wasn’t planned, it was a decision we made at the hospital to try to have a little fun with you guys.
“Now that he’s stronger and leaving the hospital to continue recovering and treating himself at home, I’m going back home and my posts will go back to being posts about my work, my city, food, drink, my kids, dogs and chickens!!
“I thank you again, from the bottom of my heart and my father’s three hearts, for all the affection and love we received from you this month!”
Pele had a failed hip replacement surgery in 2012 and uses walkers and wheelchairs in public. In recent years, he has also been taken to hospital for kidney and prostate procedures.
The Brazilian is considered to be one of the greatest players of all time having won three World Cups in 1958, 1962 and 1970. He is the only player to do so in the history of men’s football. He is Brazil’s all-time top scorer with 77 goals.