The Croatia international, who scored 18 goals in 30 appearances in all competitions for the German record titleholders last season, has signed a five-year contract with the Spanish La Liga champions after completing his medical on Thursday.
'Two wonderful years'
"We would like to thank Mario Mandzukic for two wonderful years here in Munich," said Bayern's deputy chairman Jan-Christian Dreesen. "We've won seven titles with Mario during that time and his goals have often been decisive for us. We wish him all the best at his new club, both from a sporting and a personal perspective."
Mandzukic, 28, joined the Bavarians from VfL Wolfsburg at the start of the 2012/13 campaign, scoring 48 times in 88 appearances for the club.