The world No 1, who was three strokes behind leader Louis Oosthuizen starting the day, closed with a four under par 67 to win by a shot from the South African on 20 under par and soar to the top of the FedEx Cup standings thanks to his third win of the season.
Three clear with six holes to play, McIlroy went to the par-five 18th just one in front of the overnight leader, who birdied the 13th and 15th to set up a nail-biting finish.
The 2010 Open champion had a chance to level matters going to the last when McIlroy bogeyed the 17th but he missed a 10 footer for par there to remain one behind.
McIlroy looked in trouble when he drove through the fairway at the par-five, 530 yard 18th, but he made par after laying up and watched as Oosthuizen missed the green and failed with a 12-foot birdie chance that would have forced a play-off, signing for a level par 71.
After pocketing a cheque for $1.44m, a relieved McIlroy said: “It was a case of survival. I didn’t finish it off the way I’d have liked but I got there in the end. It’s the third victory of the year, great to get a victory in these play-offs and it sets me up by putting me in a great position going into the next two weeks.”
The 23-year old superstar birdied the second and third to close within one stroke of the South African, who matched his birdie at the fourth to remain in front on 20 under.
But while McIlroy bogeyed the fifth off a bunkered tee shot, Oosthuizen racked up a double bogey six after driving into a hazard to see his lead disappear. McIlroy then birdied the sixth after a towering approach to just three and a half feet and followed that with another birdie from 11 feet at the eighth to turn in 32 and lead by two from Oosthuizen and three from Tiger Woods on 20 under with nine to play.
The chasing pack was waiting for the US PGA champion to make a mistake but he was in sensational form and he birdied the 12th from 12 feet to go five under for the day and extend his lead to three strokes on 21 under.
Oosthuizen reduced the gap to two shots with five to play when he birdied the 13th from 14 feet to get back to level for the day at 19 under.
McIlroy faced a testing, 35-yard bunker shot at the 14th but splashed out to six feet to retain his two-shot lead, then chipped dead from just off the 15th to save par again as Oosthuizen birdied from 10 feet to close within one again.
Six behind at the start, Woods made four birdies in his first nine holes but the birdies dried up on the back nine and while he had a 23-foot eagle chance at the last to get to 19 under and put pressure on the leaders, he missed and finished third on 18 under after a closing 66.
Pádraig Harrington took just 26 putts and birdied three of his last four holes in a four under 67 that helped him finish tied 59th on two over and keep alive his chances of making the Tour Championship. The Dubliner must finish in the top 10 in the BMW Championship at Crooked Stick this week to make the top 30 who go to Atlanta for the season-ending finale.
Graeme McDowell carding a one-over 72 to finish on seven over.