The visitors led 3-0 at half-time thanks to strikes by Yaya Toure, via the penalty spot, a Havard Nordtveit own goal and David Silva.
However, things got even worse for the Hammers in the second half as further efforts from Sergio Aguero - his 18th goal in all competitions this season - and John Stones rounded off the scoring for City.
As a result, it will be City's name in the hat for the fourth-round draw on Monday, while Slaven Bilic and Co can now concentrate on trying to rise up the Premier League table.