Pele has joked that he is ready to play for Brazil after being released from hospital in Sao Paulo.
The 74-year-old admitted he had a "scare" after spending several days in intensive care.
After successful treatment for a urinary tract infection, the three-time World Cup-winner talked about helping his country to Olympic football gold in Rio in 2016.
He said: "I'm well and recovered, and now I am preparing for the Olympics."
Pele has only one kidney, having had one removed towards the end of his playing career.
He was on 24 November after being diagnosed with a urinary tract infection that stemmed from surgery to remove kidney stones 11 days earlier.
The former Santos and New York Cosmos striker will continue recovering at home.
He told a news conference: "I'd like to thank the doctors that took care of me. It was a real fight.
"I would like to thank God - and all friends that have sent me messages and were worried about me.
"It was something I was not expecting, but I was not afraid to die.
"I've had messages from China, Pakistan, from almost all the European countries.
"It is gratifying and good to know that I had the support of so many people around the world who were hoping the situation improved."
Pele continued with a joke, adding: "Now I am preparing for the Olympics. Three professionals can play in the Olympics and I'm one of the three!"