Rooney scored a stunning winner
United had seen Nani's first-half opener cancelled out after the break when David Silva deflected in an Edin Dzeko shot, but Rooney's spectacular late strike ensured Sir Alex Ferguson's side hold the bragging rights over their bitter rivals.
Rooney's sixth goal of the season lifted league leaders United seven points clear of second placed Arsenal, who host Wolves later on Saturday, and eight ahead of third placed City.
Silva had a golden chance to put City ahead in the fourth minute after a one-two with Carlos Tevez, but the Spain winger poked wide from close-range.
City controlled possession for long spells in the first half without turning their dominance into further opportunities, although they had a penalty appeal for handball by Patrice Evra rejected by referee Andre Marriner.
Ferguson's side made them pay in the 41st minute as Nani opened the scoring in sublime fashion.
The move began in direct fashion as Rooney flicked on Edwin van der Sar's huge punt to Ryan Giggs. The Welsh midfielder played a superb pass through to Nani, who produced a fine first touch before surging clear of Pablo Zabaleta to shoot low beyond Joe Hart.
City levelled in the 65th minute thanks to a moment of extreme good fortune.Shaun Wright-Phillips crossed to Dzeko but the Bosnian substitute's shot was going wide until it hit Silva and looped past the wrong-footed Van der Sar.
But Rooney stole the show with one of the goals of the season in the 78th minute. Nani's deflected cross looped towards the England forward and his acrobatic aerial volley flashed past Hart.