"I have decided to stop playing football at the end of the season," Lahm, 33, said after Bayern's 1-0 win over Wolfsburg in the third round of the German Cup yesterday.
"I am sure I can keep putting in the performances until the end of the season, but not after that," added the Bayern captain, confirming an earlier press report.
Lahm explained why he has turned down the vacant sports director role, which would not have included a place on Bayern's board following recent restructuring at the club.
"I decided that for myself after talks.
More From This Section
"I'll be a private person again in the summer, then I'll have time to take care of other things and to have a few conversations."
The 33-year-old made his 500th appearance for Bayern last Saturday and will hang up his boots in June despite having a year left on his contract.
Lahm retired from international football after captaining Germany to the 2014 World Cup title in Brazil and making 113 appearances for die Mannschaft.
He joined Bayern as an 11-year-old in 1995 and, apart from a loan spell at VfB Stuttgart in 2003/04, he has spent his entire career at the Bavarian giants.
Lahm then skippered the Bayern to their 2013 Champions League victory at Wembley when they beat Borussia Dortmund 2-1 in the final.
That season, they became the first German club to complete the treble of Champions League, Bundesliga and German Cup.
With Bayern currently four points clear in the Bundesliga and through to the Cup quarter-finals, Lahm is well set to go out on a high and add to his seven league titles and six Cup victories.
With Lahm now out of the running, Borussia Moenchengladbach's Max Eberl is now favourite to take over as Bayern's director of sport after Matthias Sammer quit last year.
"We have not talked to anyone else, but there will be a sports director starting on July 1.
"It is not about the power you have in that position, but about the responsibility.