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 No 3 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.
“I don’t know if I can put it into words,” said McIlroy, who started the week annoyed at “negative spin” on his failure to win so far this season.
“I don’t really get emotional when I win but I was trying to hold back the tears on the 18th green, looking up and seeing all my friends and family.
“I don’t get the chance to play in front of them very often so to play like that and to finish like that today, I will never forget it. I’d put winning your national open up there with winning a WGC, just below the majors.
“I was trying to stay as patient as I could but it’s quite hard when you have 30,000 people roaring you on. The ovation I got when the ball landed on the 16th green sent shivers down my spine.
“I’m excited. I kept telling anyone that would listen that I was close. Maybe those last three holes is the catalyst for another great summer with three majors and everything else we have to play for with the Olympics and the Ryder Cup.”
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 yesterday morning to claim a three-shot lead over Sheffield-born 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.
Using a driver borrowed from Sweden’s David Lingmerth after cracking the face of his own club on Thursday, Knox missed good birdie chances on the first two holes before holing from 20 feet for eagle on the fourth.
Playing partner McIlroy birdied the same hole to retain his three-shot advantage before Knox birdied the fifth to reduce the gap, with both players then dropping a shot apiece on the sixth.
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 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 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.
England’s Matthew Southgate, who regained his European Tour card via the qualifying school after undergoing treatment for testicular cancer last year, carded a closing 68 to finish fourth, the best finish of his career.