A keenly contested and compelling London derby ended with three dropped points for the Blues despite taking the lead twice at the London Stadium.
In the meeting of two top-four sides, it was this morning's league leaders who twice had a first-half lead.
Thiago Silva, who opened the scoring with a header when these teams meet at Stamford Bridge last season, did the same today shortly before half-an-hour had been played.
The Blues then contrived to gift West Ham an equaliser from the penalty spot, scored by Manuel Lanzini after mistakes by Jorginho and Edouard Mendy, but a supreme volley from Mason Mount gave him his second goal of the week and Chelsea the lead again just before half-time.
However the Hammers hit back early in the second half through Jarrod Bowen and in doing so, became the first team this season to find our net more than once.
Although the Blues had a greater share of the play and more shots in the second half, the home team missed a good chance to go ahead, so neither side would have felt hard-done-by if the honours were shared, but West Ham won it with three minutes left on the clock with a goal freakish in nature.
Substitute Arthur Masuaku scored with a deflected cross from out wide, consigning Chelsea to our second league defeat of the season.
There were four changes from the side that came away from Watford with a win with Reece James and Jorginho considered fit enough to return to the line-up. Thiago Silva and Hakim Ziyech, who came on as subs in that game, retained their places. James played his 100th Chelsea game.
West Ham switched from a back-four to a back-three for this game, although they did not quite match us up in shape as they played three in central midfield to our two, and whereas Thomas Tuchel fielded his regular three in attack, David Moyes went for two strikers.
It was one of that pair, Jarrod Bowen, who had the first shot of the game which went wide, shortly before a header from midfielder Tomas Soucek met the same fate. That followed a Chelsea mistake.
Despite those moments for the home side, it was the Blues who dominated possession in the opening quarter of the game.
James forced the first save from Lukasz Fabianski but that was the sum total of our efforts on goal during that period. We knew very well that Hammers are dangerous from set-pieces but we did conceded a free-kick up our end of the pitch which led to a corner. The ball fell loose but fortunately Craig Dawson’s shot was tame enough for Mendy to make an easy save.
First blood to the Blues
With 25 minutes gone, there was a save at the other end when Havertz got his head to a James cross but three minutes later, we were in the lead thanks to another header.
West Ham may carry a set-piece aerial threat this season but so do we. From a Mount corner, the Hammers left enough space for Thiago Silva to nod the ball downwards and despite finger tips from Fabianski, it went in off the inside of the post. Thiago also scored the opener in an earlier London derby this season, away at Tottenham.
Moments later, the Brazilian was earning his keep at the other end of the pitch when he was back in the goalmouth to boot the ball clear after a Vladimir Coufal shot had beaten Mendy.
The opening goal seemed to up the pace of play and two more Blues efforts were fired straight at the Hammers keeper before the calamitous equaliser.
Jorginho began the momentary chaos with an under-hit pass towards Mendy. Although under immense pressure from Bowen, our keeper got to the ball first but opted for another touch rather than a clearance and then fouled his opponent who had nipped in front. Lanzini converted the penalty.
Hitting straight back
The West Ham goal was only the third we have conceded in the first half this season, from 11 overall, but the team reacted in the perfect way as before the break, Mount smashed us back in front.
West Ham initially gave the ball away in the middle of the park but after then it was brilliant from the Blues. Ruben Loftus-Cheek moved the ball out to Ziyech with a long pass and the winger immediately spotted Mount at the far post. Over came the dipping ball and with technique that any player in the world would admire, our Player of the Year volleyed it just inside the near post.
Despite that boost, there was another injury setback on the stroke of half-time with Havertz injured and unable to continue. That meant it was time for Romelu Lukaku at the start of the second half.
With the Blues seeking a greater lead, Rudiger went on one of his runs early on but gave Ziyech too much to do with the pass and almost immediately after, West Ham equalised for a second time.
Thiago Silva cleared a ball but could not get distance on his header. Coufal played a pass inside and Bowen beat Mendy with a firm, low shot.
Callum Hudson-Odoi was given half-an-hour to bring his good recent form to the game as a replacement for Ziyech, initially in attack but soon as left wing-back after Christian Pulisic came on for Marcos Alonso who was forced off due to a back problem.
Mount had a shot that could not beat Fabianski but West Ham had a clearer opening when an Antonio cross reached an unmarked Bowen at the far post but on the stretch, he sent it wide.
Inside the final quarter-of-an-hour, a Jorginho shot was deflected wide and another Thiago Silva header from another Mount corner caused momentary pandemonium, but there was a big blow to come.
There were 87 minutes played when Arthur Masuaku collected a throw out wide and decided to send the ball into the danger zone. Loftus-Cheek was closing the cross down but the ball took a big deflection off him, ensuring Mendy could not get across to keep the ball out.
It was always likely this would be a difficult fixture against in-form and committed local rivals, and so it proved.
Chelsea (3-4-3): Mendy; Christensen, Thiago Silva, Rudiger; James, Jorginho (c), Loftus-Cheek, Alonso (Pulisic 73); Ziyech (Hudson-Odoi 64), Havertz (Lukaku h-t), Mount
Unused subs Kepa, Azpilicueta, Sarr, Barkley, Saul, Werner
Scorers Thiago Silva 28, Mount 44
Booked Jorginho 23, James 90+2, Christensen 90+4
West Ham (3-5-2): Fabianski; Dawson, Zouma (Fornals 71), Diop; Coufal, Soucek, Rice (c), Lanzini (Benrahma 85), Johnson (Masuaku 45+2); Bowen, Antonio
Unused subs Areola, Kral, Vlasic, Noble, Ashby, Yarmolenko
Scorers Lanzini 40 pen, Bowen 56, Masuaku 87
Booked Coufal 90+1
Referee Andre Marriner