The Hammers were cruelly denied a point late on at Manchester City last time out, but against Chelsea they looked almost impenetrable, frustrating Antonio Conte's men throughout and preventing them from cutting the gap to Pep Guardiola's leaders.
This was the 41st consecutive Premier League matchday in which Moyes started in the relegation zone, setting a new record, but his West Ham side showed plenty to suggest that they are by no means a lost cause during the first half.
They had the lead within six minutes thanks to a well-worked goal from Marko Arnautovic, his first for the club, before sitting deeper and looking solid at the back.
With that approach working so well in the first half, Moyes had no intention of changing things and allowed Chelsea to have the lion's share of possession.
Chelsea threw men forward in desperate fashion towards the end, but West Ham's stubbornness gave them little hope, as Conte's men were left trailing City by 11 points, a margin which could be extended on Sunday after the Manchester derby.
Despite the contrasting fortunes of the two sides coming into the game, West Ham were the ones to take the lead and they did so in style.
Manuel Lanzini found Arnautovic on the edge of the box and the Austrian darted into the area, jinked onto his left and sent a curling strike around Andreas Christensen into the bottom corner.
West Ham subsequently became very defensive, inviting pressure.
And they needed Adrian - who retained his place with Joe Hart dropped to the bench - at his best twice in quick succession just before the half-hour mark, getting down to his left to deny long-range efforts from N'Golo Kante and then Davide Zappacosta.
But otherwise the home side did a fine job of restricting Chelsea's flow of chances, with their packed defence making it extremely difficult for the visitors to play through them.
Proceedings continued in a similar fashion at the start of the second half, with Chelsea piling the pressure on and West Ham hoping to catch them on the break.
And the plan almost succeeded in the 54th minute, with Arnautovic flicking the ball into the Chelsea area after a swift counter and seeing it strike the arm of Christensen, referee Anthony Taylor waving penalty appeals away.
But at the other end West Ham continued to keep Chelsea at bay, with Winston Reid making a vital block to halt Christensen's 10-yard volley.
Chelsea should have levelled late on through Alvaro Morata, but the Spaniard hurriedly lashed wide of the bottom-left corner from just inside the box and that proved to be the visitors' final chance, as West Ham successfully held on.