Born in Weilheim, Müller played as a youth for TSV Pähl, and at the age of 10 he made the 50-kilometre (31 mi) journey to join local Bundesliga side Bayern Munich in 2000. He progressed through the youth system and was part of the team that finished runner-up in the Under 19 Bundesliga in 2007. He made his debut for the reserve team in March 2008 when he replaced Stephan Fürstner in a Regionalliga match against SpVgg Unterhaching, in which he scored. He made two more Regionalliga appearances in the 2007–08 season, while continuing to play for the under-19 team. The following season, Bayern's second string qualified for the newly formed 3. Liga, and Müller established himself as a key player – he played in 32 out of 38 matches and scored 15 times to make him the league's fifth top scorer. He also became involved in the first-team under then manager Jürgen Klinsmann; he appeared in pre-season friendlies, and made his full debut on 15 August 2008, when he came on as a substitute for Miroslav Klose for the last ten minutes of a Bundesliga match against Hamburger SV. Despite Müller feeling that his performance did not go well, he made three more Bundesliga appearances that season and made his Champions League debut on 10 March 2009 when he was substituted on in the 72nd minute for Bastian Schweinsteiger in a 7–1 win over Sporting CP. He scored Bayern's last goal as they won the tie 12–1 on aggregate.
In February 2009, Müller signed his first contract for the senior team, a two-year deal effective from the 2009–10 season, along with reserve teammate Holger Badstuber.
Müller was prepared to be loaned or even transferred away to find first-team football, but when Louis van Gaal was appointed manager, both Müller and Badstuber became fixtures in the Bayern first team from the start of the season. In the first few matches, Müller was a regular substitute, and on 12 September 2009, he was brought on against Borussia Dortmund and scored two goals in a 5–1 victory. Three days later, he scored another brace in a 3–0 Champions League victory over Maccabi Haifa. He rounded off September by being named the Bundesliga Player of the Month and earned praise from his namesake, legendary former Bayern and striker Gerd Müller. After the Haifa match, Müller was in the starting XI for almost every match, only missing one match, a Champions League match against Bordeaux, for which he was suspended, because he was sent off in an earlier match against the same team.
In February 2010, Müller signed a new contract with Bayern Munich through 2013. During the second half of the season, Müller continued to be a regular first-team starter, usually playing in a central striking role due to the availability of other wide players Franck Ribéry and Arjen Robben. In April 2010, he scored the second goal in a 2–1 win against title rivals Schalke 04, and in the penultimate league match of the season, he scored the first hat-trick of his career, in a 3–1 win over VfL Bochum which effectively secured the for Bayern. The title was confirmed a week later with a 3–1 win at Hertha BSC, a match which Müller started.
For the season, he played in all 34 Bundesliga matches, starting 29, and recorded 13 goals and 11 assists. Bayern and Müller were back in Berlin the following week, to face Werder Bremen in the final of the DFB-Pokal. Müller started the match and Bayern won 4–0 to complete the domestic . Müller scored four goals and made two during the competition, which made him its leading scorer for the season. Bayern's season ended in pursuit of a first , in the 2010 Champions League Final against Inter Milan at Santiago Bernabéu Stadium in Madrid. It was not to be, however, as they lost 2–0, with both goals coming from Diego Milito. Müller was in the starting line-up and had a key chance just after half-time, with Bayern 1–0 down, but his shot was saved by . Müller felt particularly disappointed by this defeat, but he ended his first season as a first-team player with 52 matches played and 19 goals in all competitions.
In a poll conducted by the sports magazine kicker, he was voted by his fellow professionals as the best newcomer of the 2009–10 season and was named in the Bundesliga Team of the Season. Müller credits Van Gaal for having had the biggest part to play in his rise to success – the coach arrived with a reputation for promoting youth team players, particularly at Ajax, and consistently gave Müller his chance in the first-team, going as far to say "Müller spielt bei mir immer" ("with me, Müller will always play"). Müller, in return, described Van Gaal as "a genius technician" who makes players "improve every time".
Müller with Bayern Munich in Saint Petersburg, Russia, May 2011
Müller returned from his post-World Cup break to sign another contract extension, this time extending his stay at Bayern until 2015. As with all of Bayern's World Cup participants, he missed much of pre-season, and his first match back was the Supercup against Schalke 04 on 7 August. He was named in the starting 11, and scored the opening goal in a 2–0 win. Two weeks later he scored the opening goal of Bayern's league season in a 2–1 home win against VfL Wolfsburg. Müller played in every match of the first half of the season, usually as a starter, but as the team struggled for results, Müller was unable to match the previous season's goalscoring exploits, being dropped to the bench, and even receiving a telling off from Louis van Gaal after missing an easy chance in a 2–0 defeat against 1. FC Kaiserslautern in August. He was philosophical about this dip in form, though, and after eight league games without a goal, he scored in a 4–1 win against Eintracht Frankfurt on 27 November; He followed that by scoring in consecutive league and cup wins against VfB Stuttgart three weeks later. These goals took his tally to eight goals in all competitions and included a spectacular goal to open the scoring in a 2–0 Champions League victory against Roma on 15 September.
As his team was on its winter break, Müller was left to reflect on what he described as "an almost unbelievable first year as a pro". Müller began the second half of the season in good form, but was involved in an altercation with teammate Arjen Robben, who was angered when Müller showed his displeasure at a poor free-kick Robben took during a 3–1 win at Werder Bremen. Müller again played in every game of the season and scored 19 goals (12 in the league), but the season was less successful for Bayern, as they finished third in the league, and were knocked out of the DFB-Pokal in the semi-finals by Schalke 04 and in the round of 16 of the UEFA Champions League by Inter Milan; Bayern had won 1–0 at the San Siro, and Müller scored 31 minutes into the second leg to make it 3–1 on aggregate, but Inter levelled the score at 3–3 in the 88th minute to go through on the away goals rule. Müller's mentor Van Gaal was increasingly criticised for inflexibility in tactical, transfer and selection policy, and ultimately lost his job, being replaced with Jupp Heynckes.
In Bayern's first DFB-Pokal game Müller was awarded the man of the match after earning two penalties which were converted by Mario Gómez and Bastian Schweinsteiger, Müller then added a third in the closing stages to secure a 3–0 victory over Eintracht Braunschweig. It took Müller five matches for him to get his first league goal; he scored it against Schalke 04 in Bayern's 2–0 win. Müller then scored in Bayern's next home game in the early stages of the match, which the went on to win, 3–0. On 26 November 2011, Müller netted the opener on the half-hour in Bayern's 6–0 thrashing of FC Ingolstadt, giving him his second DFB-Pokal goal. Müller was on the short-list of this year's FIFA Ballon d'Or award. On 10 and 15 January, in Bayern's warm up friendlies, Müller scored three goals in two games, a brace against the (which Bayern then went on to win 4–0) and one goal in Bayern's other 4–0 victory over Rot-Weiß Erfurt. Müller provided two assists in Bayern's win over VfB Stuttgart in the DFB-Pokal. On 11 February, Bayern played 1. FC Kaiserslautern and Müller ended a goal drought lasting since 24 September 2011 with a header in their 2–0 victory. On 31 March 2012, Müller played his 100th Bundesliga game against 1. FC Nürnberg. On 19 May 2012, Müller scored the opening goal in the Champions League final against Chelsea with a powerful header. He was substituted shortly afterwards. Bayern Munich, however, lost the final on penalties. Müller stated how dissatisfied he was about the amount of time he had spent on the bench recently. Müller said that although he was dissatisfied he wanted to stay at Bayern. During the season, Müller scored seven goals in 34 league matches, two goals in five German Cup matches, and two goals in 14 Champions League matches.
Müller's first Bundesliga goal of the season came over 2. Bundesliga champions SpVgg Greuther Fürth in Bayern's 3–0 victory on 27 August 2012. On 2 September, he netted a brace as Bayern thrashed southern rivals VfB Stuttgart, 6–1, in front of 71,000 at the newly expanded Allianz Arena. Müller helped Bayern achieve a record-breaking start to the league season, when he netted a brace over newly promoted Fortuna Düsseldorf on 20 October in their 5–0 victory, recording Bayern's eighth successive win. Three days later, he scored his first Champions League goal of the season, netting from the penalty spot, as Bayern defeated Lille 1–0 at the French side's newly built Grand Stade Lille Métropole.
On 13 December, after his good run of form in the first half of the Bundesliga season, Müller pledged his allegiance claiming he was at home in Munich and that, "There is no club to step up from when you leave FC Bayern... there almost is no better club." Six days later, he signed a two-year contract extension, keeping him at the Allianz Arena until 2017. At the winter break in the Bundesliga, he had nine goals and seven assists in 16 league appearances and a further three goals in the Champions League; this gave him a total of 13 goals halfway through the season, including his strike against Borussia Dortmund in Bayern's win in the 2012 DFL-Supercup. Müller scored his first goal in Bayern's second game back from the break in a 2–0 away win over VfB Stuttgart. Müller tapped in his fifth goal of the Champions League campaign on 2 April, completing a 2–0 first leg defeat of Juventus in the quarter-finals, ending the Italian club's 18-match unbeaten record in Europe. On 23 April 2013, Müller scored two goals and gave one assist in 4–0 win against Barcelona in the Champions League semi-final in the Allianz Arena. On the return fixture, Müller scored a header as Bayern won 3–0 and gave Barcelona their biggest defeat ever in the Champions League, with a 7–0 aggregate score. Müller then went on to play an important role in Bayern's 2–1 victory over Borussia Dortmund in the final. On 1 June, Müller scored a penalty in the final of the 2012–13 DFB-Pokal. Bayern won the cup 3–2 to complete an historic treble. Müller scored 23 goals overall in the season (including all competitions), netting 13 in the Bundesliga, one in the Pokal, and an impressive eight in the Champions League, he also added one in the 2012 DFL-Supercup which Bayern won 2–1. This topped off Müller's highest scoring season to date.
Müller with Bayern in 2013.
Müller began the 2013–14 season by playing in the German Super Cup. by scoring in seven of Bayern's 12 pre-season games. His first competitive match came against Borussia Dortmund in the German Super Cup. On 5 August, Müller scored a hat-trick as Bayern won 5–0 in the team's 2013–14 DFB-Pokal first-round game against Schwarz-Weiß Rehden. In Bayern's opening 2013–14 Bundesliga fixture, Müller missed a penalty for the first time. Seconds later, the save from the penalty flicked the hand of which resulted in another penalty which David Alaba converted. After this, Müller stated, "I am still happy to take penalties, but I think David Alaba is the main man for spot kicks for now." He played in the UEFA Super Cup. On 25 September, against Hannover 96 in the second round of the DFB-Pokal, Müller scored twice taking his cup tally to five goals in just two games. On 28 September, Müller scored the only goal in a 1–0 victory over VfL Wolfsburg, giving him his first goal in the 2013–14 Bundesliga. Müller scored his first 2013–14 UEFA Champions League goal of the campaign and Bayern defeated Manchester City 3–1 at the City of Manchester Stadium on 2 October. He played in a match at the FIFA Club World Cup.
On 17 May 2014, Müller scored Bayern's second goal in a 2–0 extra-time defeat of Borussia Dortmund in the 2014 DFB-Pokal Final, giving die Roten the tenth league and cup in their history. Müller finished as the tournament's top scorer with eight goals in five appearances. He finished the season by scoring 13 goals in 31 league matches, eight goals in five DFB-Pokal matches, and five goals in 12 Champions League matches.
After the 2013–14 season, Müller signed a new contract keeping him at Bayern until 2019 and rejected a contract offer from Manchester United. Müller played in the DFL-Supercup, which was Bayern's first match in the 2014–15 season. Bayern lost the match 2–0. His first goal of the season was against Preußen Münster in the DFB-Pokal on 17 August 2014. Then in the opening match of the Bundesliga, on 22 August 2014, Müller scored the opening goal of Bayern's Bundesliga season against VfL Wolfsburg. Bayern went on to win the match 2–1. On 11 March 2015, Müller scored two goals against Shakhtar Donetsk in a 7–0 win to draw level with former teammate Mario Gómez as the top-scoring German player in UEFA Champions League history. He subsequently became the leader when he scored in a 6–1 win against Porto on 21 April 2015. He finished the season with 13 goals in 32 league matches, a goal in five DFB-Pokal matches, and seven goals in ten Champions League matches.
Müller started the season by playing in the DFL-Supercup against VfL Wolfsburg. He started the league season with two goals against Hamburger SV, a goal against 1899 Hoffenheim, two goals against Bayer Leverkusen, and a goal against FC Augsburg in the first four matchdays. He had scored from the penalty spot against Bayer Leverkusen and Augsburg. He failed to score in his next three Bundesliga matches. He failed to convert a penalty shot against Mainz 05 on matchday seven. His next Bundesliga goal came when he scored two goals against Borussia Dortmund on matchday eight. One of the goals was scored from the penalty spot. His goalscoring continued in other competitions. He scored two goals against Wolfsburg in the second round of the DFB-Pokal, and in Champions League, two goals against Olympiacos, two goals against Arsenal, and a goal in the return leg against Olympiacos. In scoring in the home win over Olympiacos, Müller became the youngest player to win 50 UEFA Champions League games, beating the record of Lionel Messi by 14 months.
On 9 December 2015, Müller came on as a 46th-minute substitute for Franck Ribéry in a 2–0 win against Dinamo Zagreb. He failed to convert his penalty shot in the match and finished the group stage with five goals from six appearances. On 18 December 2015, Müller signed a new contract with Bayern, keeping him at the club until 2021. On 19 December 2015, Bayern defeated Hannover 96 1–0 with a goal from the penalty mark from Müller. Bayern went on winter break after the match. Müller finished the first half of the league with 14 goals from 17 appearances. This includes scoring five goals from the penalty mark in six opportunities. He had scored 21 goals in 25 appearances in all competitions up until the winter break.
On 12 March 2016, Müller scored a brace in a 5–0 victory over Werder Bremen. Four days later, with Bayern trailing Juventus 1–2 in the second leg of the Champions League round of 16, he scored a 91st-minute equaliser before Bayern won in extra time 4–2 (6–4 aggregate).
On 19 April 2016, Müller scored both goals in Bayern's 2–0 defeat of Werder Bremen in the DFB-Pokal semi-final. His first goal of the match was his 150th for the club in all competitions.
On 3 May 2016, Müller had a penalty kick saved by Jan Oblak in the Champions League semi-final second leg at home to Atlético Madrid. The match ended in a 2–1 win for Bayern but the team was knocked out on the away goals rule.
He finished the season by scoring 20 goals in 31 league matches, four goals in five German Cup matches, and eight goals in 12 Champions League matches. He didn't score in the German Super Cup.
Müller started the season by winning and scoring in the 2016 German Super Cup against Borussia Dortmund on 14 August 2016. In the league, Müller did not score for 999 minutes until he scored during a home game against VfL Wolfsburg in the 76th minute. He finished the 2016–17 season by scoring five goals in 29 Bundesliga appearances, no goals in three German Cup appearances, and three goals in nine Champions League appearances. Müller did have a career best 12 assists in the Bundesliga.
Several German football experts like Lothar Matthäus blamed manager Carlo Ancelotti for Müller's struggles in front of the goal. Ancelotti often preferred Thiago Alcântara as the player playing behind the striker, Müller's prime position. Müller was often benched for the important matches in Europe and in the Bundesliga.
Müller started the 2017–18 season by playing in the 2017 German Super Cup. He played in the opening 67 minutes before being replaced by Kingsley Coman. His first goal of the season was against Mainz on matchday four of the Bundesliga. On 21 January 2018, he scored two goals against Werder Bremen in the Bundesliga. On 20 February 2018, Müller scored two goals against Beşiktaş in Champions League.