West Ham captain Mark Noble had given the Hammers the lead.
Pep Guardiola named new signings Rodri and Angelino in the starting line up, along with five youngsters including Adria Bernabe and Nmecha.
City star Kevin de Bruyne said, "We weren't at the best level but we expected it. Tough couple of days, the travel wasn't the best, the travel we did was not ideal. I think everybody did a good job and we need to work hard.
"I'm happy with the performance for the first game of the season. I'm maybe a little bit more tired than happy.
"That's what we need, everybody knows the level to get to this team, the competition is high. We need that in the league.
"It's going to be easier for me. When I played I was happy with myself but I couldn't reach the level I reached the year before.
"We've got four weeks until the first league game."