Chelsea had midfielder Nemanja Matic and manager Jose Mourinho sent off as Andy Carroll's late winner gave West Ham a 2-1 win.
Mauro Zarate fired the Hammers in front when Chelsea failed to clear a corner.
Matic was sent off after being booked twice in nine minutes before the break, and Mourinho joined him after speaking to referee Jon Moss at half-time.
Gary Cahill levelled from a corner but Carroll's first goal since January 2015 sent the Hammers third in the table.
Chelsea, who have now lost five of their first 10 Premier League games this season, continue to sit in the bottom half of the table.
As well as Matic and Mourinho, the Blues' assistant first-team coach Silvino Louro was also dismissed.
Chelsea had five other players booked in a stormy match between the London rivals, the last to be played at Upton Park in the league before West Ham move to the Olympic Stadium next summer.
Saturday's other Premier League results
Aston Villa 1-2 Swansea: Andre Ayew scored a late winner for Swansea to pile more pressure on Aston Villa boss Tim Sherwood.
Leicester 1-0 Crystal Palace: Leicester striker Jamie Vardy scored in his seventh successive Premier League game as the Foxes moved up to fourth in the table.
Norwich 1-0 West Brom: Norwich City suffered a third straight Premier League defeat as Salomon Rondon's header secured victory for West Bromwich Albion at Carrow Road.
Stoke 0-2 Watford: Troy Deeney and Almen Abdi both scored as Watford spoiled Mark Hughes's 100th game in charge of Stoke.
Arsenal 2-1 Everton: Arsenal went top of the Premier League for the first time since February 2014 as headers from Olivier Giroud and Laurent Koscielny defeated Everton.