The 23-yr-old, who gained the 2018 World Cup with France, will be a part of the Bundesliga leaders on 1 July.
During his scientific at Bayern, medical doctors located Hernandez had broken a ligament in his right knee, and he subsequently had a surgical procedure on Wednesday.
“This is a certain important day in my footballing profession,” Hernandez said.
“Bayern Munich is one of the nice clubs in Europe and the world. I’m proud with a view to combat for all viable titles with Bayern.”
Hernandez, who can play at each center-lower back and left-returned, has made sixty-seven La Liga appearances at Atletico and received the Europa League and Super Cup.
He has won 15 worldwide caps for France, offering in all their World Cup games in Russia.
“I’m delighted a good way to sign one of the high-quality defenders within the international, a World Cup winner, in Lucas Hernandez,” stated Bayern wearing director Hasan Salihamidzic.
“Lucas will maintain our exceptional tradition of French footballers and improve our group.”