The 33-year-old has spent his entire career with the Bavarians, first joining the club at the age of 10 before coming through the youth ranks and making his first team debut during the 2008/2009 season.
Muller's previous deal would have expired in the summer of 2023.
Muller has made 624 appearances in total for Bayern Munich, scoring 226 goals.
"I'm delighted to have extended my contact with FC Bayern Munich until 2024," Muller told the club's official website on Tuesday.
"The journey we've been on since I joined the FCB academy in 2000 has been a fantastic success story up to now.
"It gives me immense pleasure to hold up the red colours year after year, on and off the pitch – even if the wind blows in your face from time to time. Let's keep going together."
The Germany has among other honours, won 11 Bundesliga titles, two UEFA Champions League trophies, two FIFA Club World Cups and six DFB-Pokals.
"Thomas Müller is an icon who wears the club badge in his heart," said Bayern CEO Olivier Kahn. "FC Bayern has always been characterised by continuity, and therefore we're pleased that we've managed to extend the contract of this important player. He's someone who assumes leadership and is also an important character in the dressing room with his personality."
"You can't imagine Thomas Müller without FC Bayern - nor FC Bayern without Thomas Müller. That's why we're very happy that Thomas has extended his contract until summer 2024," added sporting director Hasan Salihamidzic.
"Thomas is a leader who's hungry for success, and a role model on and off the pitch who embodies FC Bayern better than anyone."