City boasted five changes from the side that lost to Tottenham on February 2, with centre-back Aymeric Laporte, left-back Benjamin Mendy, Gabriel Jesus, Bernardo Silva and David Silva all starting in place of the injured Raheem Sterling, Fernandinho, Ilkay Gundogan, Riyad Mahrez and Oleksandr Zinchenko who was suspended after his red card at Spurs.
West Ham made just one change from the side that squandered a 3-1 lead in their last match, the 3-3 draw with Brighton on February 1, as defender Arthur Masuaku came in on the left flank, with Michail Antonio moved into attack to replace Sebastien Haller.
City, who had won each of their last seven Premier League meetings against the Hammers, should have gone ahead in the sixth minute when Jesus went through on goal, but his heavy touch in trying to get past Lukasz Fabianksi allowed Ryan Fredericks to nick the ball away from him.
Sergio Aguero poked a shot just wide and Fabianski denied Kevin De Bruyne with an outstretched leg as City dominated the early exchanges.
Having dominated possession and firing six shots on target, it was no surprise when City finally broke the deadlock on the half-hour when Rodri got his head to a De Bruyne corner at the near post and the ball looped into the far corner of the net.
Jesus advanced to the edge of the area and forced Fabianski into a low save on 40 minutes, before West Ham engineered their best chance of the half when Declan Rice laid the ball into the path of Antonio and his low effort flew just wide of the far post.
Fabianski again put in a vital interception with his foot to prevent a Kyle Walker cross from the right byline reaching the waiting Aguero in the six-yard box on 47 minutes, before Aguero was inches wide of the far corner with an angled drive moments later.
City did get their second of the night on 62 minutes when De Bruyne played the ball to Bernardo Silva inside the area and continued his run to collect the return pass and then placed his side-foot effort inside the near post.
Jesus looked certain to make it 3-0 on 77 minutes when he was picked out in the area by De Bruyne, but Fabianski raced off his line to block the Brazilian’s close-range effort.
Jarrod Bowen was handed his Hammers’ debut late on but the January signing from Hull City couldn’t help the Londoners find a way back into the contest.
The win moves City four points clear of Leicester in third place as Liverpool sit 22 points ahead of them in top-spot, while West Ham remain in the final relegation place, just a point behind 17th-placed Aston Villa.