Molinari, whose second place 12 months ago was his fifth top 10 at Wentworth in the last six years, began the day in a tie for the lead with McIlroy but quickly moved clear with birdies on the third, fourth and eighth and never looked like being caught until some late drama on the final hole.
Three ahead playing the 18th, Molinari's third shot to the green almost span back into the water and his fourth left him facing five feet for par, with McIlroy 20 feet away for eagle.
However, McIlroy agonisingly left his attempt inches short and Molinari held his nerve to hole out for par, meaning he had dropped just two shots all week, the last coming on the 10th hole of the second round.
The impressive win will take Molinari, 35, back inside the world's top 20 and within sight of securing a third Ryder Cup appearance in September.
McIlroy had enjoyed a three-shot lead at halfway, but struggled to a 71 on Saturday and rescued a 70 on Sunday with birdies on the last two holes.