"Having that kind of support is the best thing any manager can have. I have everything I could possibly want to do my job well and I am humbled by the confidence the Owner, Chairman, Ferran and Txiki have shown in me to continue for two more years after this season," Guardiola said in a statement.
"The challenge for us is to continue improving and evolving, and I am very excited and about helping Manchester City do that," he added.
Guardiola spent four seasons in charge of Spain's Barcelona, where he claimed 14 major trophies, including the Club's first-ever treble in his first year in charge.
During his years in Barca, Guardiola clinched two UEFA Champions League trophies and two UEFA Super Cup titles.
The 49-year-old, who has been serving for Manchester city since 2016 led his team to win two English Premier League titles and three English Super Cups.