Sane has signed a five-year contract with the German champions after a €49 million (£44.2m) deal was agreed with City. The fee could rise to €60m and also includes a 10% sell-on clause.
"FC Bayern is a great club with big goals -- and these goals suit me as well," Sane said. "I'm looking forward to the new challenge and can't wait to train with the team. I know [Bayern coach] Hansi Flick from the U21 national team, we had a very good relationship there. I want to win as many trophies as possible with FC Bayern, and the Champions League is the top priority."
Sources had told ESPN how Sane was set on leaving City but he will not be eligible for Bayern until next season and will not feature in their remaining Champions League fixtures when the competition restarts in Portugal in August.
The 24-year-old has signed a deal worth close to €22m a year, almost double the offer that had been on the table to stay at the Etihad Stadium. Sane rejected three contract offers from City before deciding to return to the Bundesliga, sources told ESPN.
Bayern CEO Karl-Heinz Rummenigge said: "We're very happy to welcome Leroy to FC Bayern. He is an outstanding player who has proven his qualities over the past few years, especially in the national team. Our goal is to gather the best German players at FC Bayern and the signing of Leroy emphasises this goal. I want to congratulate Hasan Salihamidzic on successfully concluding the transfer."
Sane moved to England from Schalke for £37m in 2016 and made 135 appearances for City, scoring 39 goals. He won five major trophies during four years at the club, including two Premier League titles, and was named the PFA Young Player of the Year in 2018 ahead of Tottenham's Harry Kane and Manchester United's Marcus Rashford.
City decided to cash in on Sane now rather than lose the Germany international for free next summer. He has been restricted to just 11 minutes of Premier League football this season after suffering a knee ligament injury in the Community Shield against Liverpool in August.
Sane wrote a farewell to City on social media and said: "Thanks so much for the great time and all the support over the last 4 years.
"It has been a really intense and successful time which I surely won't forget. We won many games, scored a ton of goals, broke a couple of records and celebrated 7 trophies together.
"Thanks to all the fans, to the staff and to my teammates! I will always remember this time with great joy and pride."
Sancho, who left the Etihad Stadium for Borussia Dortmund in 2017 and has been linked with Manchester United, had been suggested as a possible replacement but Guardiola is adamant it will not happen.
"No, no. no, he decided to leave," Guardiola told a news conference on Wednesday.
"Why should he decide to come back? When he decided to move to Dortmund it's not because he is going to decide to come back later. It would make no sense. He didn't want to be here, so that is why he doesn't want to come back here."