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.
The West Ham boss made three changes from the side that lost 2-0 at home to Manchester United at the start of the week, with Adrian replacing Darren Randolph in goal, and there were also starts for Andy Carroll and Edimilson Fernandes in place of Dimitri Payet and the Africa Cup of Nations-bound Cheikhou Kouyate.
His opposite number, meanwhile, made five alterations from the team that beat Burnley 2-1 at home in the Premier League on Monday afternoon, with the Catalan bringing in the likes of Willy Caballero, Stones, Pablo Zabaleta, Silva and Aguero.
Both goalkeepers were called into early action, with Adrian's legs keeping out a Silva shot at his near post, before West Ham immediately went up the other end of the pitch, with Caballero forced to beat away Michail Antonio's deflected drive.
However, it was the visitors who gradually started to take control of proceedings with their slick passing, with Aguero being denied by a brilliant fingertip save from Adrian, before they finally broke the deadlock via the penalty spot 12 minutes before half-time.
Zabaleta, playing in midfield, exchanged passes with Raheem Sterling before driving into the box, only to be upended by Angelo Ogbonna, with referee Michael Oliver immediately pointing to the spot despite there appearing to be little contact made by the West Ham defender.
Toure, though, made no mistake from the spot as the Ivorian thrashed home his 13th successful spot-kick in all competitions for City, despite Adrian diving the right way.
But if the Hammers felt hard done by with the visitors' opener, they had no complaints about their second goal eight minutes later as City launched a blistering counterattack following a West Ham corner.
Silva, Aguero and Bacary Sagna all exchanged a neat array of passes down the right, before the latter's cross was turned into his own net by Nordtveit, with Sterling breathing down his neck.
And before the home side could catch their breath, City had scored again to all but end the game as a contest, with only one minute and 46 seconds separating the visitors' second and third goals.
Again the pacy Sterling was involved as the England international latched on to Aguero's defence-splitting pass, before he picked out the unmarked Silva six yards out and the playmaker made no mistake from close range.
Whatever Bilic said to his players at the break clearly made no impact as City once again dominated right from the restart, adding a fourth within five minutes through Aguero.
Sterling dribbled his way to the left byline, before pulling the ball back for Toure waiting on the edge of the area. And although the midfielder did not catch his shot properly, Aguero was lurking just in front of Adrian to register his 154th goal for City, taking him above Colin Bell in the club's all-time scoring list as a result.
After both managers made a raft of changes with upcoming Premier League games in mind, including Guardiola opting to rest man-of-the-match Silva who had pulled City's strings all night long, Stones added a fifth six minutes from time.
Substitute Nolito swung in a left-wing corner which the centre back guided goalwards and despite Mark Noble's intervention on the line, referee Oliver awarded the goal after consulting his watch that told him the ball had crossed the goalline.