James Ward-Prowse gave the hosts the lead against the run of play in the first half before City responded emphatically after the break with goals from Jeremy Doku, Bernardo Silva and Erling Haaland.
Pep Guardiola, returning to the dugout after a back operation, saw his side dominate the game early on before an incisive West Ham break saw them take the lead.
West Ham 1-3 City | Match report
However, the boss rallied his team at half-time and was rewarded almost immediately when Doku curled home his first City goal from a tight angle on the left.
We continued to press the home side but had to wait until the 76th minute for Bernardo Silva to nudge us ahead from close range.
Haaland completed the scoring ten minutes later when he slotted home from around 12 yards to seal the three points and extend our 100% record in the Premier League.
Watch the extended highlights above...