An afternoon of frustration for the Reds, who are beaten for the first time this season. Manuel Lanzini, Mark Noble and Diafra Sakho scored the goals, while Philippe Coutinho and Noble were sent off.
West Ham won their first league match at Anfield since 1963 and inflicted a first loss of the season on Liverpool in a game featuring two red cards.
The Hammers produced a masterclass of counter-attacking football, with Manuel Lanzini impressing on his debut.
He scored the first and set up the second for MarkNoble, who became the second player sent off after Philippe Coutinho was red carded for Liverpool.
Diafra Sakho added a third for West Ham in injury time.