Only minutes earlier Bayern president Uli Hoeness had told reporters he knew nothing of Lahm's retirement and said any announcement would be a joint one with the club.
The 33-year-old Lahm, who retired from worldwide football after leading Germany as captain to the World Cup title in 2014, says "it's just a few more months but no more".
Lahm was reportedly offered a sporting director position by Bayern Munich but turned it down.
"We are talking about more than a year and I believe that I am not able to maintain the level that I am used to and my teammates are used to".
Lahm announced the news after Bayern's 1-0 win over Wolfsburg in the DFB-Pokal, having made his 500th Bayern appearance against Schalke on Saturday.
Bayern Munich captain Philipp Lahm thanks the fans after the team's win against Benfica in the Champions League on 13 April 2016.
It Would Appear That Donald Trump Doesn't Know Who Frederick Douglass Is
Some took his comments as suggesting 19th-century abolitionist leader Frederick Douglass was still alive. Douglass was born a slave, and became an orator and a leading figure in the anti-slavery movement.
Chairman Karl-Heinz Rummenigge put out a statement on Wednesday saying the club is "surprised by Philipp Lahm and his advisor" and he had "assumed a joint statement would be made".
"Lahm would have been a sports director without a seat on the board (of directors) - unlike predecessor Matthias Sammer (2012 to 2016)".
Lahm will end his career as a Bayern legend, yet there was a time when his future at the club was uncertain as he was sent on a two-year loan to Stuttgart in 2003.
"We want to make it clear that the doors at Bayern Munich will remain open for Philipp".
"I always approached this decision with a lot of thought".
Until then, fans will remember Lahm as a legendary player, who led Germany to victory at the 2014 FIFA World Cup and revolutionized the fullback position.
- Sarkozy to appeal decision to send him for trial
- Milo Yiannopoulos says he's coming back to Berkeley
- The Trump presidency on February 8 at 8:45 AM EST/1345 GMT
- Kim Jong Un fires spy chief, instead of killing him
- Wall Street welcomes Trump the deregulator
- First Tomb Raider movie pics show the new Lara Croft
- Sergio Aguero's future at City
- European Union leaders launch scathing attack on Donald Trump
- Big cocaine bust off NSW coast; NZ boat owner arrested and charged
- Oil down on Wednesday as supplies remain plentiful amid OPEC-led cuts