The 27-year-old from Florida fired a five-under-par final round 67 to finish on 16 under for the tournament following a tense duel.
The 27-year-old from Florida fired a five-under-par final round 67 to finish on 16 under for the tournament following a tense duel with compatriot Brian Harman that was settled on the home stretch at the rural Wisconsin course.
Koepka's 16-under-par total equalled the record for the lowest winning under par total at a US Open set by Rory McIlroy at the 2011 championship.
"That's probably one of the coolest things I've ever experienced and to do it on Father's Day it's pretty neat," Koepka said afterwards.
"I didn't exactly get my dad a card, so this works."
"I felt confident all week. So to feel as confident as I did on a Sunday of a major and coming down the stretch was pretty neat."
Third round leader Brian Harman, who had led by one-shot at the start of the round, finished second on 12 under after an even-par 72. He tied with Japanese world number four Hideki Matsuyama, who shot a superb six-under-par 66.
"It bites a little bit right now," Harman said afterwards. "But Brooks played so well today. The conditions were so tough."
England's Tommy Fleetwood was alone in fourth place on 11 under after a level-par final round of 72.
Harman and Koepka spent much of the round locked at the top of the leaderboard.
But the turning point in a gripping war of nerves came just after the turn when Harman struggled through back-to-back bogeys on the 12th and 13th.
World number 22 Koepka then uncorked a brilliant trio of birdies on the 14th, 15th and 16th holes to surge into a four-shot lead and virtually assure himself of the title.
"That was kind of lights out," Harman said. "I mean, you've got to tip your cap. He went and won the golf tournament on the back nine. I've done it before, but he did it today."
Koepka's win extended a remarkable run of victories by players who had never previously won a major. Since Jason Day lifted the 2015 PGA Championship, every major championship has been won by a first-timer.
Koepka, a close friend and training partner of world number one and 2016 US Open champion Dustin Johnson, had only won one title on the PGA Tour since turning professional in 2012.
With strong winds buffeting the 7,721-yard layout at Erin Hills earlier in the day, Mother Nature had appeared poised to bite back after three days of benign conditions which led to a feast of low-scoring.
But with the gusts gradually weakening over the course of the afternoon, Koepka and Harman picked up where they left on Saturday, seamlessly getting into the groove early on to jump ahead of the field.
Koepka was the first to strike, making a birdie on the first to go to 12 under and take a share of the lead. He then chipped to a few feet for a straightforward birdie to move to 13 under.
Harman, playing in the final pairing immediately behind Koepka, then rolled in a 29-foot birdie putt on the third to join Koepka at the top of the leaderboard.
As the front nine progressed, it looked increasingly as if it would come down to a question of who would blink first.
Koepka landed the first blow on the par-four eighth, draining a magnificent 33ft putt to move one clear at 14 under.
But the American then paid the price for an over-aggressive birdie attempt on the 10th which sailed past the hole leaving an awkward putt to save par. He duly missed to drop back to 13 under.
Koepka then frittered a golden chance to regain the lead on the 11th, but was unable to convert a nervy nine-foot putt for birdie.
Another birdie chance lipped out on the 12th as the tension mounted.
The deadlock was broken when Harman's tee-shot on the 12th landed into the deep fescue, forcing him to hack out onto the fairway. Unable to get up and down Harman bogeyed to leave Koepka clear on 13 under.
Koepka then turned the screw with a nerveless trio of birdies to seize the crown.
Matsuyama meanwhile, produced an inspired round to raise hopes of a grandstand finish after he had begun the day six off the pace.
"I played two good rounds, but it wasn't enough," Matsuyama said of his Open campaign. "No regrets, I did play well. Just came up a little short."
Rickie Fowler's hopes of ending his wait for a major faded with an error-strewn performance, a level-par 72 leaving him six shots adrift.
Justin Thomas, the hero of the third round after a record-breaking nine-under-par 63, saw his challenge wilt with a three-over-par 75.