"We are delighted that Joshua Kimmich is staying in Munich! Joshua identifies totally with FC Bayern," the club's sporting director Oliver Kahn wrote on Twitter.
The Bavarian giants were intent on keeping Kimmich, who has become one of Europe's best midfielders since he signed from Bundesliga rivals RB Leipzig in 2015.
In all, Kimmich has racked up 264 appearances with Bayern, 30 goals, and won six German titles, three German cups and one Champions League title with the club.
"The most important reason for my contract extension is that every day at FC Bayern I can pursue my passion with joy," Kimmich said in a club statement.
In the summer, Bayern lost Austrian defender David Alaba on a free transfer to Real Madrid after his contract ended. The club were keen to avoid a similar situation developing with Kimmich.
Kimmich played the full 90 minutes on Sunday as Bayern Munich battled their way to a 3-2 win against FC Cologne, their first home win of the new Bundesliga campaign.