Rooney, who hadn't scored for club or country since March, netted a first-half penalty after Ryan Giggs had been fouled in the box.
Slick second-half goals from Nani and Dimitar Berbatov sealed the victory as the Reds recovered quickly from last weekend's draw at Fulham.
United were soon into their stride with in-form Paul Scholes demonstrating his trademark awareness and passing range.
Nani was first to seriously threaten when he fizzed a free-kick just over the bar, and shortly after the winger's fierce shot thudded against the crossbar via the palm of Robert Green.
Rooney might have done better with a volley after a fine headed set-up by Berbatov, but the England man was soon to have his name on the scoresheet.
Scholes fired a long-range ball to Giggs wide on the left, and after a subtle trick he was brought down by Jonathan Spector in the box.
Rooney slotted the ball past Green, who dived the wrong way.
The lead should have been doubled before half time. Old stagers Giggs and Scholes simultaneously slide tackled Scott Parker in a moment that brought a smile to the faces of the Reds faithful, before Giggs pinged a glorious ball forward to Nani.
The winger, though, could only prod the ball over the bar when through on goal.
Five minutes after the break Nani did find the back of the net.
Fine interplay from Scholes and Rooney set the Portuguese star free, and after a neat sidestep he slammed a left-footed shot into the goal.
The Hammers kept going and Kieron Dyer, one of the visitors' more lively performers, hit the outside of the post.
But it was a brief moment of light for West Ham, as United poured forward at will with pace and movement.
Sure enough, the third came in exquisite style. John O'Shea cut the ball back to Nani in the box, who clipped a cross to the far post, where Berbatov slammed home an acrobatic volley from close range.
That goal effectively ended the game as a contest, and although the Hammers kept going, the victory was never in doubt.
Source: Manchester Evening News.