The league leaders were beaten 2-1 by the Hammers at the Etihad Stadium. West Ham’s win has now moved the London club to second place on the log behind City.
City’s loss came after they suffered a 2-1 defeat in the UEFA Champions League match against Juventus during the week.
Victor Moses and Diafra Sakho ensured the Hammers run away with the three maximum points, while Kevin de Bruyne scored the only goal for City, which is his first. West Ham defeated Arsenal in their first league match at the Emirates.
City has 15 points, with West Ham second on 12 but with a better goal difference than Leicester, also on 12. Manchester United, which play at Southampton on Sunday are fourth on 10 points, with Arsenal fifth on 10.