The 26-year-old made 190 appearances for Leipzig, winning the German Cup in 2022 and 2023. He has also made 26 appearances for Austria.
"Bayern is one of the biggest clubs in the world. I will give everything for the club and the fans," Laimer said. "... I'm in the right place here. I'm only capable of giving 100%, and that's what I'll put into every training session from day one. I can hardly wait."
Laimer becomes the first signing of the summer for Bavarian powerhouses Bayern, who won an 11th consecutive Bundesliga title in dramatic fashion last month, beating Cologne 2-1 on the final day to snatch the trophy from rivals Borussia Dortmund.