Bayern, who won a record-extending 10th straight league title last season, have reportedly agreed on a transfer worth about 40 million euros ($42.10 million), including add-ons, for the 30-year-old, who had a year left on his Liverpool contract.
"Sadio Mane is a global star," Bayern president Herbert Hainer said. "He underscores the attractiveness of Bayern and the entire Bundesliga."
The 30-year-old leaves Anfield after 269 appearances, having scored 120 goals in all competitions, a stellar return that helped the club to the Champions League title in 2018-19 and the Premier League crown a season later.
The forward became Bayern's third signing of the close season, following the arrivals of Ajax Amsterdam duo Ryan Gravenberch and Noussair Mazrouai.
"I am very happy to finally be at Bayern Munich," Sane said. "We had a lot of talks and I felt the interest of this big club from the start.
"This is why I had no doubt. This is the right time for this challenge. I want to achieve a lot of things with this club, also internationally."
Bayern are desperate for his versatile attacking spark, with wingers Serge Gnabry and Leroy Sane having lacked consistency in the past season.
The Bavarians still won the German league for a 10th straight time but failed to get past the quarter-final stage in the Champions League. They had also failed to progress in the competition in 2021, a year after lifting the trophy.
The Bundesliga is also keen on fresh big names, especially since the departure of Borussia Dortmund's Erling Haaland to join Manchester City and top striker Robert Lewandowski's doubtful future at Bayern.
Mane was among Liverpool's stand-out performers last season, netting 23 times as Juergen Klopp's side secured the domestic cup double and narrowly missed out on the league title to Manchester City.
Mane won six trophies in all following his switch from Southampton in June 2016, forming a potent attacking trio with Mohamed Salah and Roberto Firmino.
Klopp last month hailed Mane, his first major signing after taking over, as "world class" and likened him to a "machine" but the player, eager for a new challenge, declined a new contract.
($1 = 0.9502 euros)