On a back nine filled with clutch shots and as much tension as a major can provide, McIlroy emerged from a four-man race to outlast Phil Mickelson and the darkness at Valhalla to capture his second straight major.
McIlroy closed with a 3-under 68 and became only the fourth player in the last century of golf to win four majors at 25 or younger. The others were Tiger Woods, Jack Nicklaus and Bobby Jones, three of the game's greatest players.
Boy Wonder appears on his way to belonging in that group.
''I didn't think in my wildest dreams I'd have a summer like this,'' said McIlroy, only the seventh player to win the last two majors of the year. ''I played the best golf of my life. I really gutted it out today.''
But one of the greatest shows on soggy turf came with a most peculiar ending.
Three shots behind going to the back nine, McIlroy rallied to take the lead and then hit a 9-iron from the fairway bunker to 10 feet for birdie on the 17th hole for a two-shot lead going to the par-5 18th. Because of a two-hour rain delay earlier, darkness was falling quickly and it wasn't certain McIlroy would be able to finish.
McIlroy was allowed to hit his tee shot before Mickelson and Rickie Fowler had reached their drives. Both were only two shots behind, still in the game. McIlroy came within a yard of hitting in a hazard right of the fairway.
Then, the PGA of America allowed McIlroy to hit his second shot. Mickelson and Fowler had to stand to the side of the green.
''We were cool with hitting the tee shot,'' Fowler said. ''We weren't expecting the approach shots.''
Fowler had a 50-foot eagle attempt to tie for the lead. He was well off the mark, and missed the short birdie putt attempt that cost him his third straight runner-up finish in a major. Mickelson was short of the green, and his chip came within inches of dropping for an eagle that would have tied him for the lead.
Mickelson appeared upset that they had to wait to finish the hole - not standard procedure in a PGA Tour event - and he made two references in a TV interview that this is the only championship the PGA of America runs all year.
''It didn't affect the outcome of the championship at all, I don't think,'' Mickelson said. ''It's not what we normally do. It's not a big deal either way.''
Mickelson closed with a 66 and was runner-up for the ninth time in a major.
Fowler became the first player in history to finish in the top five at all four majors without winning one. He closed with a 68 and tied for third with Henrik Stenson, who fell out of a share of the lead by missing a 3-foot par putt on the 14th hole. Stenson shot a 66.
McIlroy hit his second shot into a bunker, and he had to two-putt from 35 feet for the win. He lagged the first one to tap-in range, and the major was his. McIlroy repeatedly pumped his fist before letting out a scream above the gallery that had been treated to one of the best shows ever in a major.
He won his first two majors by eight shots at the 2011 U.S. Open and 2012 PGA Championship. Only a month ago, McIlroy took a six-shot lead into the final round of the British Open and completed a wire-to-wire win with only a brief scare.
This was his first big test, and it took some of his best golf to come through.
''I think I showed a lot of guts out there to get the job done,'' he said.
The winning shot turned out to be that 9-iron from the bunker and the birdie putt on the 17th hole that gave him a two-shot lead, the largest margin for anyone on a day when as many as five players claimed a share of the lead.
It might not have been possible without a 3-wood on the par-5 10th hole.
Standing in the fairway, McIlroy watched Fowler drain a 30-foot birdie putt to take the outright lead. McIlroy was 281 yards away, slightly uphill, and his short caught the left side of the fairway and rolled onto the green before stopping 7 feet away for an eagle that got him back in the game.
Mickelson holed a 10-foot birdie putt on the 11th hole to tie Fowler, and it looked to be his day when he rolled in a 30-foot par putt on the 12th. Stenson hit a bold shot to the island-green 13th for a short birdie to tie for the lead, only to fall back.
McIlroy caught the leaders with a birdie on the 13th.
None of the other contenders made another birdie the rest of the way until it was too late.
All that was left after an exhausting day of raw emotions was the coronation. Not since Woods in 2008 has anyone won three straight tournaments, and they were big ones for McIlroy - the British Open, a World Golf Championship and the PGA Championship. He played them in a combined 48-under par.
''He's better than everyone else right now,'' Mickelson said.