"Both have remained loyal to the club since the start of their careers and will play a major role in the future. We are very happy that both players have chosen the long term for Bayern Munich."
Mueller, 24, was a reported target for new Manchester United manager Louis van Gaal, who brought him into the Bayern first team at the start of the 2009-10 season.
However, the clever forward, who won the Golden Boot at the last World Cup in South Africa, has now signed a contract until 2019.
"There were some very good discussions with the leaders of the club, who made me realise that I am in the right place here," said Mueller.
"I feel like I'm an important part of the clbub's plans. Bayern Munich has been my club since 2000 and it will remain so for the coming years."
Verstaile Germany captain Lahm, who coach Pep Guardiola described as "the most intelligent" player he had worked with last season, has signed until 2018.
Now 30 years old, the full-back, who often performs in midfield for Guardiola, said, "It is definitely my last contract, I will finish my career at Bayern. That was always my wish. I am very glad and happy."
Mueller and Lahm both played vital roles in Bayern's success in winning the Bundesliga and German Cup in the season just gone.
TWEET: A delighted Philipp #Lahm: "I will end my career at #FCBayern. That was always my wish." pic.twitter.com/VvHDOESH3x
- Sports & Recreation
- Bayern Munich
- Philipp Lahm
- Thomas Mueller