The enterprising Portuguese full back has recently lost his place in the Manchester City first eleven and desired more playing time.
Bayern Munich have the option to make the move permanent for €70m at the end of the season.
Cancelo joined Man City from Juventus in the summer of 2019 and has won two Premier League titles and two Carabao Cups with Pep Guardiola's side.
"We've signed him on loan now and have the possibility of signing him permanently in the summer," said Bayern's sports director Hasan Salihamidzic.
"Joao is a player we've been thinking about for a while now because we very much appreciate his qualities. He's the optimal fit in our system with his attacking style of play and dynamism, and his mentality and experience fit very well in our team."
"FC Bayern is a great club, one of the best in the world, and it's enormous motivation for me to now play alongside these extraordinary players in a team," Cancelo said.
"I know that this club, this team lives for titles and wins titles every year. I'm also driven by the hunger for success. I'll give my best for FC Bayern."
Cancelo counts Benfica, Valencia and Inter Milan among his former clubs.