After being stuck on 99 goals for well over a month, Rooney finally made it to three figures at Eastlands and it was a crucial goal in United's title challenge as there was no way they could afford to lose further ground on the top two, Chelsea and Liverpool.
But it proved to be a hard-earned victory, especially after United were forced to play the last quarter of the game with ten men after Cristiano Ronaldo was sent off, his second dismissal in Manchester derbies.
However, City were unable to make their extra man count as United avenged the two defeats they suffered in last season's derby fixtures.
It was one-way traffic for the opening half-hour as United enjoyed the territorial advantage and carved out four clear-cut scoring chances.
City keeper Joe Hart pulled off a brilliant save to keep out Dimitar Berbatov's header, having earlier fumbled a shot from Rooney which almost presented Darren Fletcher with a gift.
Ronaldo headed narrowly over and Patrice Evra saw a shot clear the crossbar by inches.
Yet it was City who almost stole ahead in the 32nd minute when United keeper Edwin van der Sar's poor punched clearance fell to Stephen Ireland on the edge of the box but his shot struck the outside of a post.
It was the only time United's goal was threatened in the one-sided opening period in which United finally broke the deadlock in the 42nd minute.
Michael Carrick's angled shot was saved by Hart but the keeper could only parry the ball into the path of Rooney who scored from inside the six-yard box.
City manager Mark Hughes brought on Elano and Pablo Zabaleta for Dietmar Hamann and Darius Vassell at the break, switching from a 4-3-3 to a 4-4-2 formation.
And the re-jigged side was far more threatening as Vincent Kompany, Benjani and Javier Garrido each shot narrowly wide early in the second period.
City's hopes of forcing their way back into the game were given a further boost when United were reduced to ten men following Ronaldo's dismissal midway through the half.
Having already been booked for a foul nine minutes earlier, Ronaldo collected a second yellow card for a deliberate handball.
Suddenly the balance of power shifted City's way as United were forced to defend their one-goal advantage for the final 22 minutes.
But the visitors played with great discipline and it was all credit to them that City mustered only one serious chance in the second minute of stoppage time when Richard Dunne's shot was cleared off the line by Evra.
In the dying seconds of the game, Rooney almost added a second spectacular goal for United from just inside the City half but Hart, who had gone upfield to join the attack, somehow managed to get back and claw the shot away from on the goal-line.