West Ham ended Liverpool’s 25-game unbeaten run in all competitions and moved above Jürgen Klopp’s side in the process after a stunning performance at the London Stadium.
The hosts stormed into a lead after just four minutes with Pablo Fornals’ corner was inadvertently touched into his own net by Alisson Becker.
Trent Alexander-Arnold restored parity with an exquisite free-kick from the edge of the box just before half-time.
But the Hammers took the game away from their visitors in eight second-half minutes.
First, Jarrod Bowen’s direct run through the middle of the pitch split open the Liverpool defence which allowed the winger to play Fornals in to drive the ball through the arms of Alisson.
Bowen then provided a dipping corner which found Kurt Zouma free at the back post to head home to give David Moyes’ men a two-goal cushion.
Liverpool pushed for a way back into the game and substitute Divock Origi smashed home a smart half-volley but it proved to just be a consolation as West Ham jumped over their opponents into third place in the Premier League table.