Ole Gunnar Solskjaer's men had won back-to-back matches in all competitions heading into the Premier League clash but were beaten by goals from Andriy Yarmolenko and Aaron Cresswell late in both halves.
Yarmolenko scored the breakthrough goal 44 minutes in and Cresswell converted a free-kick six minutes from time to kill off United, which ended the match without a recognised striker after losing Marcus Rashford to injury.
Victory for the visitor would have lifted it into third place but it is West Ham which leaps up the table, Manuel Pellegrini's men moving into the top four thanks to its third win of the season.
The sides managed just six shots between them in the first half - only one Premier League game has seen fewer in the opening 45 minutes this season - but West Ham found a way through from one of them.
Felipe Anderson played a first-time pass into the path of Yarmolenko, who took a touch and rifled the ball into the bottom-left corner of David de Gea's goal.
United continued to look disjointed in the opening 15 minutes of the second half and was further blunted in attack when Rashford was forced off in the 61st minute.
The visitor came close to a leveller with 68 minutes on the clock, though, Maguire seeing a low shot saved by Lukasz Fabianski after being teed up by Scott McTominay.
But it was punished for failing to take its only real opportunity of the match as Cresswell curled in a free-kick late on to seal the win.