Guardiola's previous deal was set to expire next summer.
Despite talk of a potential return to Barcelona in recent weeks, the Spaniard is sticking with City as they continue their search for a Champions League title.
"It is testament to the qualities of the man that Pep Guardiola's passion and intelligent approach are now woven into the very fabric of the football we play and our culture as (a) club," chairman Khaldoon Mubarak said in a statement.
"That impact has been central to our success during his tenure and it is why I am delighted that he shares our view that there is so much more to be achieved both on and off the field."
Guardiola's currently in his fifth season with City, the longest he's ever spent coaching a single club. He left Barcelona and Bayern Munich, respectively, after just three years.
Since arriving in England in 2016, the 49-year-old has won the Premier League twice, the League Cup on three occasions, and the FA Cup. He steered City to an unprecedented domestic treble in 2018-19, winning in all three competitions.
But success has eluded City in Europe. They've yet to reach the Champions League semifinals under Guardiola, falling at the quarterfinal stage three times.
"The challenge for us is to continue improving and evolving," Guardiola added, "and I am very excited and about helping Manchester City do that."