Former Germany captain Ballack, who also played for Bayern Munich and Chelsea, was believed to be in talks with clubs in Australia about extending his career there, but he announced on Tuesday that his appearance in a Leverkusen shirt on May 5 this year was his last.
"At the age of 36, I can look back on a long and wonderful time in professional football," he said in a statement released by his agent Michael Becker.
"As a child, I could never have even dreamt of having such a career.
"It was a privilege working with first-class coaches and fantastic team-mates. Of course I am going to miss running out in front of 80,000 spectators or scoring goals."
Ballack became a free agent at the end of June after Leverkusen opted not to offer their former captain a contract extension.
He has had plenty of offers in the meantime, but said: "The last few months without playing football have shown me that the time had come to give it up.
"I am now looking forward to the next chapter in my life and would like to thank my family and all the amazing people who have supported me, pushed me and accompanied me," he added.
"They have made a major contribution to my success."
Ballack began his professional career in 1995 and won the first of four Bundesliga titles with Kaiserslautern in 1998.
He missed out on a major trophy with Leverkusen in his first spell at the club and in 2002 he finished as a runner-up in the Bundesliga, DFB-Pokal, Champions League and World Cup.
However, he won three titles in four years with Bayern Munich before moving to Chelsea, where he won the Premier League, the FA Cup three times and the League Cup.
Having made 98 appearances for Germany, he missed out on a century of caps when a dangerous tackle by Kevin-Prince Boateng in the 2010 FA Cup final led to him missing that summer's World Cup due to injury and losing his captain's armband as he failed to fight his way back into the national team.
He spent the last two seasons of his career with Leverkusen and appeared for the last time in a 4-1 win over Nurnberg, leaving the field to a standing ovation in the 51st minute of what turned out to be his last-ever game as a professional footballer.