Van Gaal to become Bayern boss in summer
Van Gaal, the 57-year-old former Ajax Amsterdam, Barcelona and Dutch national team coach, will be released by current side AZ Alkmaar after the clubs reached an agreement during talks in the Netherlands on Wednesday.
"We are delighted to be getting such an experienced and successful coach," Bayern chairman Karl-Heinz Rummenigge said on the Bayern website.
Van Gaal will replace Jupp Heynckes, who stepped in on an interim basis until the end of this season after Bayern sacked Jurgen Klinsmann last month.
The move completes the rehabilitation of a coach who won the Champions League with a hugely talented Ajax team in 1995 and enjoyed early success with Barcelona.
However, he blotted his record badly with the Dutch national team when they failed to reach the 2002 World Cup, resigning after only 14 matches in charge, and then followed that up with a second, frustrating spell with Barca that ended in 2003.
Van Gaal returned to full-time coaching with Alkmaar in 2005 and led them to the Dutch league title this season, their first such honour since 1981.
Bayern were desperate to go back to basics after the failed Klinsmann experiment this season with Bayern manager Uli Hoeness eager to sign "a football teacher" who will bring out the best in a team with considerable potential.
Hoeness also wanted the new coach to speak German, which Van Gaal does, to facilitate communication.
The Dutchman will be joined in Munich in July by Hamburg striker Ivica Olic, 22-year-old Alexander Baumjohann from Borussia Moenchengladbach and Anatoliy Tymoschuk from Zenit St Petersburg who have already agreed to move to Bayern.
Although Van Gaal had a contract with Alkmaar until 2010, the 2008 German champions will not be paying the Dutch club after they agreed to an early release for the coach.
Bayern have instead offered the chance of a friendly match in the Netherlands.
"As a thank you for meeting us halfway Bayern will, most likely in the summer of 2010, appear for free for a friendly match at the Dutch champions," the club said in a statement.
Bayern are second in the Bundesliga, behind Wolfsburg on goal difference with two games left to play after winning all three matches under Heynckes, who took charge in late April.