Lahm, 33, joined Bayern aged 11 and has spent almost his entire career there, but will exit at the end of the season.
The German World Cup winner was under contract until 2019 and has also turned down a role as sporting director.
Chief executive Karl-Heinz Rummenigge said the club were "surprised" by the actions of Lahm and his agent, adding: "the doors at Bayern will remain open".
Lahm, one of Germany's most successful footballers, announced his intention to retire at the end of the season after his 501st game for the club, a German Cup win over Wolfsburg.
Shortly before Lahm made his statement, the club's 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.
Media playback is not supported on this device
Rummenigge added: "Bayern Munich are surprised by the actions of Philipp Lahm and his advisor.
"Until yesterday we were expecting to issue a joint statement from Philipp Lahm and Bayern Munich. Uli Hoeness and myself had honest, intensive talks in the past months with Philipp about a potential involvement in the management of our club.
"Last week he informed us he was currently not available for the sports director position and that he wants to end his contract early."
Lahm made his debut for Bayern in 2002 and has remained with the cub, apart from two seasons on loan at Stuttgart between 2003 and 2005.
He has won seven Bundesliga titles, six German Cups, the Champions League, as well as captaining Germany to the World Cup in 2014.
Bayern Munich were taken by surprise by the timing of captain Philipp Lahm's decision to announce his retirement.