BREAKING NEWS: Real Madrid secure Kroos move
Bayern confirmed the move on their official website on Thursday, with club chairman Karl-Heinz Rummenigge wishing the 24-year-old well in the Spanish capital.
Kroos has made over 200 appearances for the Bavarian giants, winning three Bundesliga titles, three DFB-Pokals and the UEFA Champions League in 2013.
However, his future at the Allianz Arena became shrouded in doubt as he entered the final year of his contract and sought assurances of his first-team importance.
Manchester United had also been linked with a move for the 51-cap Germany international, but he has opted instead for the Santiago Bernabeu.
He represents Real's first plunge into the transfer market this season as they look to launch an assault on the Liga summit, having finished third last term.
Carlo Ancelotti's side will also have their Champions league crown to defend, as well as a bloated schedule due to their involvement in the FIFA Club World Cup.