McIlroy had found himself two behind as Justin Rose put the finishing touches to a dazzling course-record 62, the lowest round of his European Tour career by two.
He chipped close on the long 14th, pitched to three feet at the next, made a 20-foot effort on the 16th and went one ahead with a six-foot putt on the short 17th.
Rose had done miraculously well to two-putt the par five last for birdie from around 100 feet, but McIlroy matched it to win by two. He shot 66 for 23 under.
By adding the title to his European Tour money list crown McIlroy earned himself a combined £1.46million.
It was his fifth victory during a 2012 which included a second major title - like the first by eight shots - and the same money list double on both sides of the Atlantic achieved by Donald last year.
After joining in the water on the last Donald shared third place with South African Charl Schwartzel.
McIlroy said: "I saw Justin make a charge - I heard the cheers - but to finish like that was great. I could not have wished for any better. To back up 2011 with another major (like the first by a runaway eight-shot margin) and to be part of an unbelievable story at the Ryder Cup has made it an incredible year.
"But hopefully I can emulate it or do even better next year!"