The 41-year-old has been out of work since he left Barcelona at the end of the last campaign following four successful seasons in charge at the Camp Nou.
However, he recently revealed that he was ready to return to management, which was said to have alerted the likes of Chelsea, Manchester United and Manchester City.
Despite that reported interest, the race for his services has been won by four-time European champions Bayern, who will disperse of the services of Jupp Heynckes at the end of the current season.
"Jupp Heynckes will finish his successful career by the end of this season. Pep Guardiola will take over as FC Bayern head coach in July," the club posted on their official Twitter account.
Early reports have suggested that Guardiola has signed a three-year contract at the Allianz Arena.