McIlroy had seen his three-shot lead turned into a one-shot deficit with three holes to play as Scotland’s Russell Knox carded four birdies and an eagle in a final round interrupted twice by hailstorms and torrential rain.
But the world number three then birdied the par-five 16th as Knox three-putted and, after lipping out for birdie on the 17th, fired a stunning approach from 252 yards to within three feet of the hole on the 18th for a closing eagle.
The resulting 69 meant McIlroy finished three shots clear of Knox and Wales’ Bradley Dredge to claim the first prize of £515,000, which he will donate to his own foundation which hosted the tournament for the second year.
Dredge surged through the field with a 66 to secure the biggest pay-day of his career, with Knox returning a 68.
McIlroy had missed the cut in his home event for the last three years, but completed an error-free 70 in the weather-delayed third round on Sunday morning to claim a three-shot lead over Masters champion Danny Willett.
And, although Willett’s challenge stalled in the final round with 13 straight pars before he collapsed to a closing 77, Knox ensured McIlroy would not have things all his own way.
After a delay of 69 minutes following the first deluge, McIlroy edged two shots clear with a birdie on the 10th, only to three-putt the 11th and then see Knox draw level with a birdie on the 14th before play was temporarily halted again due to another spell of hailstones.
McIlroy did well to make par on the 15th after driving into the trees and charging his long birdie attempt four feet past the hole, but still found himself relegated to second place as Knox holed from six feet for birdie.
However, McIlroy’s length off the tee gave him the upper hand on the par-five 16th (above) and he took full advantage with a stunning approach from 270 yards to set up a two-putt birdie, while Knox found sand off the tee and three-putted for a costly bogey.
McIlroy’s birdie putt from six feet on the 17th lipped out, but it did not matter thanks to a magnificent approach to the 18th which ensured he could enjoy the walk to the green and take in the cheers of the crowd.