The club's board of directors took the decision in a bid to help prevent Bayern missing out on a place in European football's top domestic competition.
The 59-year-old Van Gaal was informed of the decision after his side returned to Munich following Saturday's 1-1 draw at Nuremberg saw Bayern drop to fourth in the Bundesliga.
They must finish at least second in the table to be sure of a Champions League place next season, with five games remaining.
Bayern are 14 points behind Bundesliga leaders Borussia Dortmund.
Van Gaal's assistant Andries Jonker will take over as caretaker head coach with Hermann Gerland as his assistant.
Bayer Leverkusen's coach Jupp Heynckes has already been announced as Bayern's head coach for next season.
Van Gaal, 59, was told last month his contract, which was due to expire in 2012, would be terminated at the end of the season.