A superb finish by West Ham midfielder Declan Rice – the 19-year-old’s first Premier League goal – earned his side a fine win and dented Arsenal’s top-four ambitions.
Rice beat Bernd Leno with a first-time shot after a good lay-off by Samir Nasri, who was making his first top-flight appearance in England since August 2016.
In a highly-competitive London derby, Alexandre Lacazette was denied by an excellent save from Lukasz Fabianski as Arsenal failed to score in the league for the first time since the opening day of the season.
West Ham were full value for their win, with Marko Arnautovic, Rice, Nasri and Felipe Anderson all going close when the game was goalless.
While West Ham move up to eighth in the table after a sixth win in nine league games, Arsenal remain fifth.
The Gunners are three points behind fourth-placed Chelsea, who entertain Newcastle at 17:30 GMT.