The Sky Blues suffered crashed out in the Round of 16 stage of the competition after it ended goalless at the London Stadium in what was a cagey contest between the two sides.
City were often lacklustre in front of goal as they struggled to find the cutting edge in the final third, much due to some resolute defending by the Hammers, who enjoyed a decent spell of possession following the interval.
As neither side found the net after 90 minutes, it came down to penalties, where Phil Foden's early miss handed the win to the hosts, who were perfect from 12 yards at each time of asking.
However, City boss Pep Guardiola praised Foden for the courage he showed to step up and take the first spot-kick despite only having come on after 72 minutes of action.
Guardiola said: "He (Foden) had the courage to be the first to take one, and unfortunately he missed," as quoted by Stuart Brennan of Manchester Evening News.
"I will speak to him (Foden) tomorrow. But when you have the courage to take one, next time it will be much better."
Kevin De Bruyne, Raheem Sterling and Fernandinho were among those who returned to the line-up after being benched at the weekend against Brighton, with Kyle Walker being the only player named in the starting XI who made the line-up at the Amex Stadium.
With the likes of Phil Foden, Jack Grealish and Gabriel Jesus on the bench, the visitors failed to slice open the Hammers' backline - largely down to some quality pieces of defending from Moyes' men.
Guardiola's side will be looking to get back to winning ways on Saturday in their Premier League clash against Crystal Palace at the Etihad Stadium.
You can follow us for live updates here: @City_Xtra