Andriy Yarmolenko’s first Hammers goal opened the scoring, the Ukrainian finishing off a slick counter that went from the halfway line to the net in three touches, Marko Arnautovic with the assist.
Yarmolenko got his second in the 31st minute with a fine curled effort from just inside the box after a Jordan Pickford error gave possession to Mark Noble.
Just before the break, Gylfi Sigurdsson powered in a header from Jonjoe Kenny’s cross, converting after Cenk Tosun missed two good chances.
West Ham were coming in on the back of four consecutive defeats – a fifth straight loss would have constituted their worst ever opening of a league campaign.
But Arnautovic ensured that run came to an end when he struck clinically after a one-two with Pedro Obiang, the Hammers again profiting on the break despite Everton’s spirited start to the second half.
The Toffees were unbeaten under new manager Marco Silva before Sunday’s match, but had only won once, and they will regret the handful of individual errors and missed chances that was ultimately the difference between the two sides.
Even in the game’s latter stages they were pouring forward but could still not find the net, substitute Oumar Niasse rattling the crossbar from close range after Lucas Digne’s cross.
Victory lifts the Hammers up to 16th, with Burnley taking their place at the bottom of the table after losing 1-0 at Wolves earlier in the day. Everton are now 10th, with six points from their first five games.
West Ham were booed off after their previous game, a 1-0 home defeat by Wolves. Ex-England captain Alan Shearer described that showing as “embarrassing, hopeless and pathetic”.
This was a performance much closer to what fans will have been expecting since a summer spend of £100m and the arrival of ex-Real Madrid manager Pellegrini, title winner with Manchester City in 2014.
They were far better organised at the back, more confident in possession, and played with real energy against a full-blooded Everton side who were just determined to attack.
Lukas Fabianksi’s goal withstood seven first-half attempts before Sigurdsson’s unstoppable bullet header, and on the break Felipe Anderson was exceptional in his link-up play with Yarmolenko and Arnautovic, who was forced off in the second half.
Pellegrini said before this fixture he “trusts now more than ever” his ability to achieve at the highest level. His players backed him up with an impressive counter-attacking performance. Games against Chelsea and Manchester United are up next.