The striker, Germany's record scorer with 71 goals in 137 internationals, was without a club after his Lazio contract expired last season and he will now join the national side's coaching staff.
Klose hit a record 16th goal in World Cup finals during the 7-1 semi-final thrashing of hosts Brazil two years ago, which saw him overtake former Brazil star Ronaldo.
Germany went on to win the title in Klose's last game for his country, but he continued in the Italian league with Lazio.
Klose will join Germany's coaching staff after an invitation from head coach Joachim Löw and will be on the bench alongside Löw for the 2018 World Cup qualifier away to San Marino on November 11th and the friendly four days later against Italy in Milan.
He will complete an individual training programme with the goal of embarking on a coaching career, the German Football Association (DFB) says.
"I celebrated my biggest successes in the national team, the time was wonderful and remains unforgettable so I am happy to be able to return to the DFB," said Poland-born Klose.
"The idea has been growing in the last few months to stay on the pitch, but with a new perspective, mainly as a coach.
"To be able to read a game, to prepare myself meticulously, to develop strategies and tactics -- that had already really interested me as a player.
"I am very grateful to Jogi Löw and (DFB director) Hansi Flick for this opportunity and chance to sharpen my practical skills."
"He is a role model, as a human being and an athlete, who gives his all for the team and its success," said Löw, German head coach since 2006.
"We want to support him in the DFB on his path for becoming a coach. "I am certain we (the backroom staff), as well as the players, will benefit greatly from his presence and participation."
Löw's former assistant Flick, now the DFB's director of sport, said keeping Klose's experience was vital.
"For football as a whole it is an absolute win if someone like Miroslav Klose decides to work as a coach and to continue to work for the DFB," said Flick.
Klose made his Bundesliga debut in 2000 with Kaiserslautern and went on to play for Werder Bremen, Bayern Munich and Lazio.
He scored 121 goals in 307 matches in Germany's top flight and managed 68 goals in 173 Serie A games during five years with Lazio, who he joined in 2011.
His final appearance for Germany was in the 2014 World Cup final win over Argentina after extra time at Rio de Janeiro's iconic Maracana stadium.
Just before the tournament, he became Germany's all-time top-scorer in a 6-1 warm-up friendly win over Armenia.
He netted his 69th goal to break Gerd Müller's record of 68 goals, though Müller's phenomenal feat was in only 62 appearances, for West Germany.