The Belgian leaves Burnley after two years to take charge of the German giants.
"It's a great honour to be able to work for this club - FC Bayern is an institution in international football," said the former Manchester City captain.
Advertisement
Advertisement
Bayern's sporting director Christoph Freund said: "Vincent Kompany is a type of coach who fits in very well with FC Bayern's playing philosophy and identity.
"He is a young, very ambitious coach who brings a lot of international experience, has his finger on the pulse of the players and knows exactly what should happen on the pitch."