The Spaniard is sure to be highly sought-after following hugely successful spells at Bayern and Barcelona before that, with Chelsea one possible destination in the summer after their decision to part company with Jose Mourinho on Thursday.
Manchester City could be another possible future employer, with Guardiola having worked previously with their chief executive Ferran Soriano and director of football Txiki Beguiristain during his time at Barca, while speculation over Louis van Gaal’s future at Manchester United could make a move to Old Trafford a possibility.
Bayern announced that former Chelsea boss Carlo Ancelotti would succeed Guardiola, with the 56-year-old Italian having already agreed a three-year contract to start in the summer.
“We’re grateful to Guardiola for everything he has given to our club since 2013,” Bayern’s chairman Karl-Heinz Rummenigge said in a statement published on the Bundesliga club’s website.
“I am convinced Pep and our team are now going to work even more intensively on realising our sporting ambitions, particularly now that it has been confirmed that Pep will be leaving Bayern.”
Guardiola, 44, took over from Jupp Heynckes in the summer of 2013 on a three-year contract and won a Bundesliga and DFB-Pokal double at the end of his first season in charge.
His side also lifted the European Super Cup and the Club World Cup that term, but they were knocked out of the Champions League in the semi-finals by Real Madrid.
That is where their European journey ended last season as well with Barcelona getting the better of them, while they were knocked out of the domestic cup by Borussia Dortmund one step from the final.
They did win the Bundesliga again comfortably, though, and they are on course to make it a hat-trick of domestic league triumphs under Guardiola this season, leading second-placed Dortmund by eight points at the midway stage of the season.
The Bavarians are also into the quarter-finals of the DFB-Pokal and the last 16 of the Champions League, where they will face last season’s beaten finalists Juventus.