The Red Devils captain opened the scoring early on but set nerves jangling when he scythed down Stewart Downing in the second half, though Robin van Persie's goal told
The England skipper opened the scoring within the first five minutes as he met Rafael's cross with a convincing first-time finish before Robin van Persie made it two, slotting home precisely after a good combination with Radamel Falcao.
A mix-up from David de Gea allowed Diafra Sakho to head home on the rebound after a defensive scramble just before the break, undermining the Red Devils' good start.
|VIEW FROM OLD TRAFFORD
|By Sam Bisby
Despite a great opening 15 minutes for Manchester United, this win was far from straightforward, with West Ham finding great confidence after getting a goal back just before half-time.
The last quarter of an hour was in complete contrast to the first, as Sam Allardyce's men pushed the hosts hard right until the whistle, with Kevin Nolan almost splitting the spoils but for what must have been the slightest of offside calls.
Wayne Rooney's red card surely cannot be contested but the hosts may have reason to be frustrated with Lee Mason's performance and his leniency on the visitors.
With injuries ravaging his squad, Louis van Gaal was forced into two changes in defence, with 19-year-olds Paddy McNair and Luke Shaw coming in for their debuts in place of the injured Jonny Evans and suspended Tyler Blackett.
West Ham also made two alterations from their 3-1 win over Liverpool, as Morgan Amalfitano and Diego Poyet were handed their first starts, but the visitors were not given time to settle and Rooney opened the scoring after five minutes.
Rafael was allowed to race clear on the right and, with no defender closing him down, the full-back perfectly found Rooney, who applied a first-time finish to beat Adrian from 12 yards. It took him to third in the Premier League's list of highest goalscorers, 176 placing him ahead of Thierry Henry.
Midway through the half, after Enner Valencia and James Tomkins had wasted good chances for an equaliser, the visitors found themselves two goals behind. When Alex Song was caught in possession inside his own half, the loose ball dropped to Radamel Falcao. He found Van Persie and the Dutchman rifled the ball into the bottom corner.
However, despite their two-goal cushion, the hosts came under pressure late in the half and West Ham were rewarded with Sakho's third Premier League goal of the season in the 37th minute. De Gea, making his 100th league appearance for United, failed to claim a right-wing corner and although Valencia's header hit the crossbar, Sakho was on hand to head home the rebound.
Sakho had a chance to double his tally nine minutes after the break as a deep cross from the left found him at the back post but his volley was pushed away by De Gea.
As the hour approached, the game was turned on its head as Rooney allowed his frustration to get the better of him.
Downing looked to mount a counter-attack from a poor Manchester United free kick but the midfielder was stopped when Rooney lashed, an act that resulted in referee Lee Mason issuing a straight red card.
Wave after wave of West Ham attacks followed, and the visitors thought they had rescued a point when substitute Nolan met Carl Jenkinson's cross to convert from close range with two minutes remaining, but they were denied by the assistant referee's flag.