The Premier League champions bounced back from a 2-0 defeat by Dundee to run out victorious at Tynecastle, though striker Alvaro Negredo limped off with an injury
After an even start, City took the lead in the 25th minute as Alvaro Negredo, previously marked out of the game by the hosts' attentive back line, found space to slip in an excellent ball for Scott Sinclair to finish.
The Spain international limped off injured just before the break, though, and became one of 10 half-time changes as Pellegrini looked to wrap up the game.
Hearts got back in it, though, midway through the second period with a lightning counterattack. After new City signing Fernando lost the ball, Dale Carrick played a splitting pass through the centre-backs onto which ran Osman Sow to thrash it past Willy Caballero.
But the English champions found a winner from the penalty spot. After youngster Emyr Huws was brought down, Aleksandar Kolarov buried the spot kick to give City their first win of the summer.
More to follow...