Goals from Andriy Yarmolenko and Aaron Cresswell earned West Ham their second successive home win against Manchester United, who remain without a league win on their travels since February.
Yarmolenko opened the scoring on the stroke of half-time, sending a low finish past David de Gea following patient build-up play involving Mark Noble and Felipe Anderson.
Cresswell sealed all three points for the Hammers in the second half with a superb free-kick into the top right-hand corner.