Sources told ESPN on Friday that Mane reached an agreement with Bayern, who won their 10th consecutive Bundesliga title in May, in a total package worth €41 million.
Mane has signed a contract until 2025 with Bayern.
In a statement, Liverpool said: "We thank Sadio for everything he has done and wish him the very best of luck in the rest of his career."
In a Q&A on Liverpool's website, Mane said: "Obviously it is strange -- really, really strange -- to no longer be a Liverpool player after six years spent at Anfield. But of course I had a great time, an unbelievable time, and since my first day I really, really enjoyed training, playing, at Anfield especially and in front of these amazing supporters. Now it's come to the end, so what can you say?
"From the first day I came to the club, I spoke to the boss when I was in Southampton, and I think at that time we were not even in the Champions League. He called me and I said, 'For sure.' I just decided in my heart that I am coming to Liverpool because that is where I see myself, and for me it was the right time and the right club to achieve everything.
"So, I can say of course we won a lot and I spent a great, great time there. An unbelievable time at Liverpool, we won a lot. Like I always say, my life is always [about a] challenge and when it came I said to the club that I want to leave, I want to go somewhere else to see a new challenge. It is not anything else, it is just a challenge because for me I want to always be challenging myself to get better and better."
Mane added: "I'm really happy to finally be at FC Bayern in Munich. We spoke a lot and I felt big interest from this great club right from the beginning, so for me there were no doubts. It's the right time for this challenge. I want to achieve a lot with this club, in Europe too. During my time in Salzburg I watched a lot of Bayern games -- I really like this club!"
He becomes Bayern's third signing of the close season, following the arrivals of Ajax Amsterdam duo Ryan Gravenberch and Noussair Mazraoui.
"Everyone knows his outstanding technical qualities as well as his incredible mentality," Bayern sporting director Hasan Salihamidzic said. "He will contribute a lot and help to lead our team, which has a great structure. The fact that he's joining FC Bayern shows that our club and he have big aims. Sadio Mane fits perfectly with the football that FC Bayern play under Julian Nagelsmann."
The Senegal international made 269 appearances for Liverpool, scoring 120 times and providing 38 assists.
He joined Liverpool from Southampton in 2016, arriving within the first 12 months of manager Jurgen Klopp's reign, and played a crucial role as the club returned to the top of English football -- he lifted the Champions League in 2019 and helped to end the club's 30-year wait for a Premier League title in 2020.
He also won the Club World Cup (2019), FA Cup (2022) and Carabao Cup (2022) as he scored 120 goals in 269 games in all competitions during his time at Liverpool.
There had been speculation throughout last season that Mohamed Salah could also leave this summer, but the forward confirmed last month that he will remain at Liverpool for the 2022-23 campaign.