City eased to a win over the Hammers, but David Silva's head injury took the shine off the champion's return to form.
Pellegrini admitted ahead of the game at the Etihad Stadium that he could be sacked if City fails to finish in the top four, with the reigning champion having lost four of its previous six top-flight matches.
Despite the absence of the likes of Vincent Kompany and James Milner through injury, City was able to see off an ineffective West Ham side and move seven points clear of fifth-placed Liverpool, which does have a game in hand.
A bizarre 18th-minute own goal from James Collins put City ahead before Sergio Aguero doubled the lead with his 20th league goal of the campaign.
West Ham never threatened a fightback, but a routine victory was soured when Silva was caught by an elbow from Cheikhou Kouyate midway through the second half, with the Senegalese earning a booking.
The former Valencia midfielder received lengthy treatment from the City medical team before being taken off on a stretcher.
City had the better of the opening stages as West Ham struggled to retain possession and, after Alexander Kolarov had gone close with a curling free kick, the home side took the lead through a huge stroke of fortune after 18 minutes.
Jesus Navas picked up the ball on the right wing following a poor goal kick from Adrian and the Spain international's cross was inadvertently turned home by Collins, whose attempted clearance looped over the West Ham goalkeeper and in off the underside of the crossbar.
Collins did somewhat atone for that error as he produced a goal-saving tackle to prevent Silva from adding a second at the end of a well-worked City move.
West Ham grew into the game and provided a sporadic attacking threat, yet the club was given a mountain to climb when Aguero finished off a sparkling counter in the 36th minute.
Yaya Toure won the ball in midfield and set Aguero free, the Argentina striker then rounding off the attack with a clever low finish under Adrian after combining brilliantly with Navas.
Only an excellent last-ditch Carl Jenkinson tackle stopped Aguero from converting Toure's sublime reverse pass in the 49th minute as City continued to dominate after the restart.
Aguero spent a short time on the sidelines after seemingly picking up a knock in that tackle.
While Aguero recovered to make his way back onto the field, Silva was not so fortunate, the Spaniard receiving seven minutes of treatment on the field.
West Ham showed some positive intent in the time that remained, Enner Valencia and Kevin Nolan both spurning chances to pull one back late on.
It is now one win in 11 league games for the visiting club, while the attentions of a doubtlessly relieved Pellegrini will surely turn to the stricken Silva.