The 35-year-old finished on 17-under after a final-day 68 to climb above overnight leader McIlroy, who carded a two-under 70 on Sunday.
Molinari got over the line after a series of near misses in the European Tour's flagship event thanks to four birdies on the final day, whereas McIlroy dropped shots on holes nine and 10.
Defending champions Alex Noren was unable to become the fourth player to defend the title, as he finished alongside Lucas Bjerregaard in a tie for third after the Dane fired an eight-birdie 65 to surge into late contention.
Victory for Molinari sees him equal fellow Italian Costantino Rocca's five European Tour titles.
PGA CHAMPIONSHIP LEADERBOARD
1. Francesco Molinari (-17)
2. Rory McIlroy (-15)
3. Lucas Bjerregaard (-14)
=. Alex Noren (-14)
5. Kiradech Aphibarnrat (-13)
=. Branden Grace (-13)