"My dear friends. I'm happy to be able to write again to let you know that I'm fine," Pele said on Twitter on Tuesday, Xinhua reported.
Pele was admitted to a hospital in France on April 2 after suffering from fever during an event with Paris Saint-Germain and France forward Kylian Mbappe.
The 78-year-old travelled back to Brazil last Monday but was immediately taken to Sao Paulo's Albert Einstein hospital, where he underwent surgery to remove a kidney stone. He was discharged on Monday.
"I would like to thank the medical staff of Albert Einstein Hospital, and especially you, for the prayers and positive energy. I'm back on the field, thirsty for new goals in life," he added.
Pele, the only player to win the World Cup three times, has suffered from a series of health issues in recent years, including prostate problems and complications from hip replacement surgery.