You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
He triumphed at Bethpage Black to secure his fourth major title in less than two years and take over the world number one ranking.
It was not pretty but Koepka limped across the finish line two strokes ahead of fellow American Dustin Johnson in a championship that suddenly came to life in strong and gusty winds that provided a stern examination of skill and patience.
A closing four-over 74 sealed the deal as he became the first champion to lead wire-to-wire since Hal Sutton in 1983.
"I'm just glad we didn't have to play any more holes," Koepka said at the victory presentation as he received the Wanamaker Trophy.
"That wind was up (and) D.J. played awesome. He put the pressure on but I'm glad to have this thing back in my hands."
A seven-shot lead when he started the day dissolved to a one-shot advantage, with Johnson, playing two groups ahead, making birdie at the 15th hole.
With the raucous gallery cheering for Johnson, it would have been easy for the leader to crumble completely.
But Johnson could not avoid trouble either. He bogeyed the 16th and 17th holes, affording Koepka luxurious breathing space.
Asked if he was aware how tenuous his lead had become, Koepka said: "How could you not with the D.J. chants?
"He put unbelievable pressure on me. I'm still in shock right now. This is awesome.
"I put it in the rough almost every hole today but to grind it out ... this is the most satisfying of all four (major wins)."
Koepka finished at eight-under 272, while Johnson (69) had to settle for second place on six-under, the 2016 U.S. Open remaining his only major title.
Four strokes further back, Americans Jordan Spieth and Patrick Cantlay and Englishman Matt Wallace shared third place.
No player has claimed their first four majors as quickly as Koepka, who won back-to-back U.S. Open titles in 2017-18.
He also became the first repeat PGA Championship winner since Tiger Woods in 2007.