The tearful Corinthians forward announced his decision at an emotional press conference in Sao Paulo, during which he also revealed that he suffered from a thyroid problem.
"I'm stopping my career as a professional footballer," he said, his voice breaking. "It's been a beautiful, emotional, marvellous career.
"These last two years, I've had a long series of injuries, from one side to the other, one leg to the other, one muscle to the other. The pain pushed me to think about the end of my career."
Having earlier indicated that he hoped to play on until the end of the year, injuries and Corinthians' early elimination from the Copa Libertadores prompted him to bring forward his retirement.
During a prolific 14-year spell in Europe, Ronaldo scored goals at a prolific rate for PSV Eindhoven, Barcelona, Inter Milan, Real Madrid and AC Milan, before returning to Brazil in 2008.
He won the World Cup with Brazil in 2002, having been a non-playing squad member of the successful 1994 side, and became the leading scorer in World Cup finals when he scored his 15th goal at the 2006 tournament in Germany.
He was twice named European Footballer of the Year, in 1997 and 2002, and finished his international career with 62 goals in 97 appearances.