Koepka, 29, went into the final round with a seven-stroke lead at Bethpage Black over Dustin Johnson. He made bogey on four straight holes on the back nine allowing Johnson to close the gap to one stroke.
Johnson birdied on No. 15, but hit back-to-back bogeys at 16 and 17 to restore Koepka’s three-shot cushion.
Koepka finished with a 4-over 74 to win by 2 strokes to win the PGA Championship for the second straight year.
"I'm just glad I don't have to play any more holes," Koepka said. "That was a stressful round of golf. I'm glad to have this thing back in my hands."
The 29-year-old joins Tiger Woods as the only golfer to win the PGA in back-to-back years since the tournament went to stroke play in 1958. Koepka has also won back-to-back U.S. Opens.
Johnson, the No. 1 player in the world rankings, shot 69. It's the second straight major he's finished as runner-up. Johnson, who was second to Woods at the Masters last month, has finished second in all four majors.
"I gave it a run," Johnson said. "That's all you can ask for."
The Associated Press contributed to this report.