The midfielder revealed his delight at putting pen to paper on the new deal:
"This is a club with a fantastic future and I want to be a part of it for as long as possible.
"With Pep [Guardiola] in charge, I feel sure we can win significant silverware and, importantly, we will try to do it playing attractive, attacking football.
"It's a pleasure to be a part of this club and I look forward to seeing what the next few years bring."
Txiki Begiristain, the Sky Blues' director of football, added: "We're delighted Ferna has signed his new contract. He is a senior member of the squad, and his professionalism and work ethic are second to none. His form has been fantastic this season, and we're happy he's extended his deal for a further two years."
The deal follows Nicolas Otamendi's, after the defender signed on until 2022 on Wednesday. The pair are City's top distributors, per BT Sport Score:
Stuart Brennan of the Manchester Evening News and former City striker Paul Dickov were pleased to see the 32-year-old tied down, as his contract was due to expire in the summer:
The Brazil international has made over 200 appearances for the Sky Blues since his arrival in 2013 and contributed to the team's Premier League and League Cup triumphs in his first season.
He also scored in the League Cup final to help City win it again in 2016.
This season, Fernandinho has typically operated as the team's only defensive-minded midfielder to allow the likes of David Silva and Kevin De Bruyne the freedom to roam and create at will.
It's a job he does well, as Squawka Football highlighted:
He will turn 33 in May, by which time he will likely have secured his second Premier League title with City.
Despite his age, his contributions this season have warranted an extended stay at the Etihad, and he should have plenty more to offer over the next two-and-a-half seasons, so it represents good business to keep him.