The 24-year-old Spain international will bolster Bayern’s defence, which has been left short on cover with centre-backs Niklas Suele and Lucas Hernandez sidelined by knee injuries.
“We decided to comply with the request of our head coach Hansi Flick for reinforcements in defence and together we decided on Alvaro Odriozola,” said Bayern chairman Karl-Heinz Rummenigge in a statement.
“We are very happy about his signing and would like to thank those in charge at Real Madrid for their very friendly and cooperative discussions.”
The move helps both parties as Odriozola, who was signed from Real Sociedad for 35 million euros ($39 million) in 2018, has struggled for game time in Madrid, where Dani Carvajal is preferred in the right-back role.
Basque-born Odriozola, who has won four caps for Spain, was sent off in a 1-0 away defeat to Mallorca in mid-October and has not played in La Liga since.