Bayern sacked Carlo Ancelotti last week.
Heynckes, 72, led Bayern to the domestic league and Cup double and the Champions League title in 2013 before making way for Spaniard Pep Guardiola.
Ancelotti took over last season but the Italian was fired after Bayern slipped to second place in the league, squandering two-goal leads in consecutive games. They also lost 3-0 at Paris St Germain in the Champions League.
“I wouldn’t have returned to any other club in the world, but FC Bayern Munchen are very close to my heart,” Heynckes said in a statement on the club website.
“My coaching staff and I will now do everything to bring back successful football for the fans. I‘m very much looking forward to this challenge.”
Heynckes, who also coached Bayern from 1987-91, will reunite with former assistants Peter Hermann and Hermann Gerland, who were part of his backroom staff during the club’s treble-winning season.
Hermann has left his post as assistant coach at Bundesliga 2 side Fortuna Duesseldorf, while Gerland – currently sporting head of Bayern’s youth set-up – will now work with the first team until the end of the season.
“There’s a great mutual trust between Jupp Heynckes and FC Bayern,” CEO Karl-Heinz Rummenigge said. “We’re very thankful to Jupp that he’s accepted the offer of head coach. He’s the ideal man for FC Bayern at this moment in time.”
Heynckes’s first match in charge is a home game against Freiburg on Oct. 14. Bayern are five points behind leaders Borussia Dortmund in the Bundesliga standings after seven games.