Dominic Calvert-Lewin scored the only goal of a scruffy game to keep alive Everton's slim hopes of qualifying for the Champions League, while denting West Ham's own ambitions of finishing in the top four.
Calvert-Lewin pounced for his 16th Premier League goal of the season midway though the first half, and West Ham had no response, with Everton keeper Jordan Pickford hardly tested all game. It was a huge disappointment for the Hammers manager David Moyes against his former side, who had could and should have scored more.
Calvert-Lewin's strike in the 23rd minute was enough, though. Ben Godfrey, the young right-back, sent a decisive forward pass from his own half, Calvert-Lewin held off the challenge of Craig Dawson and fired a low shot past Lucasz Fabianski into the far corner of goal.
West Ham should have equalised five minutes before half-time when Manuel Lanzini crossed from the right on to the head of Said Benrahma at the far post. But the Algerian forward sent the ball over the bar.
Jesse Lingard, somewhat below par, went close with a curling effort from long-range, but Pickford was not as busy as Fabianski, who tipped over a free-kick from Gylffi Sigurdsson and then had to save at the feet of Richarlison.
Everton had a huge let off on the hour mark when West Ham defender Vladimir Coufal shot against the inside of the far post and substitute Jarrod Bowen failed to put rebound home from a yard out.
Carlo Anceloti's men could have sealed victory seven minutes from the end when Calvert-Lewin crossed for Josh King at the far post, but the former Bournemouth striker, who had gone on as substitute moments earlier, headed against the woodwork from point-blank range.
Everton are still in eighth place, three points behind West Ham with a game in hand, and both teams need to catch Leicester or Chelsea if they are to finish in the top four.
Fabianski 7; Coufal 6, Dawson 6, Diop 6, Cresswell 6 (Fredericks 59); Lanzini 6 (Bowen 43), Soucek 6; Fornals 7, Lingard 6, Benrahma 5 (Yarmolenko 73); Antonio 5.
Pickford 6; Godfrey 7, Mina 7 (Holgate 62), Keane 7, Digne 7; Coleman 6, Allan 7, Davies 7, Sigurdsson 6 (Delph 85); Richarlison 7 (King 83), Calvert-Lewin 8.