Socrates, the captain of the Brazil team at the 1982 World Cup Finals, has been discharged from hospital after treatment for a stomach haemorrhage.
The 57-year-old was admitted to a Sao Paolo hospital with gastrointestinal bleeding on 18 August.
The hospital has said the haemorrhage was caused by high blood pressure in the vein carrying blood from the digestive system to the liver.
Socrates won 60 caps in Brazil's midfield, scoring 22 goals.
He led the flamboyant but ultimately unsuccessful Brazil team at the 1982 World Cup in Spain.
Brazil cruised through the first group-stage, scoring 10 goals, and then beat Argentina 3-1.
But despite a Socrates goal they were eliminated after losing 3-2 to Italy in the second game of the second group-stage.
Socrates also played in the 1986 World Cup in Mexico - not as captain - but missed a spot-kick as they lost to France in a quarter-final penalty shootout.
Socrates Brasileiro Sampaio de Souza Vieira de Oliveira, to give him his full name, delayed the start of his international career until the age of 25 so he could complete his studies as a doctor.
In his retirement, he has added a doctorate in philosophy and fathered six children, and he continues to practice medicine in the town of Ribeirao Preto in addition to being a commentator on both football and cultural issues.
He is also well-known for his smoking habit.