The 36-year-old former Chelsea star has been without a team since a two-year contract with Bayer Leverkusen ended in May.
Since then he was reported to be negotiating with clubs in north America's MSL and Australia's A-League, but nothing came of the talks.
He released a statement which read, “At 36 I look back at a long and wonderful time in professional football, a time I would never have dared to dream of as a child. It was a privilege to work with first-class trainers and fantastic players. I will certainly miss playing in front of 80,000 fans, and shooting goals.
“But the last few months without active football have shown me that the time has arrived to stop. I am happy about a new chapter in my life and thank my family and all the fabulous people who have supported, challenged, accompanied and helped me. They all have a share in my success.”
He made the last of his 98 appearances for Germany when he captained the team during their friendly defeat against Argentina in March 2010. He had first played for Germany in April 1999 against Scotland.
Before that he was with the team that came second in the World Cup in 2002, second in the European Championship in 2008 and third in the World Cup in 2006.
He played for 1. FC Kaiserslautern, Bayern Munich, FC Chelsea and Bayer Leverkusen – and was on German champion teams four times, German cup winners three times and once English champions. He won the FA Cup three times with Chelsea.