A par on the final hole tied Rory McIlroy's record score to par at 16 under for a four-shot victory. He is the seventh consecutive first-time major victor.
The opening round was without Phil Mickelson for the first time since 1993.
Prior to Sunday, Koepka's only win on the PGA Tour came in 2015 at the Waste Management Phoenix Open.
Harman, who had taken the outright lead earlier in the round with a birdie at three, seemed to fade as the pressure increased, bogeying the 12th after finding the rough and missing a short putt on the 13th hole as Koepka was going the other way. "At the beginning of this year, I felt I needed to win multiple times and a major", Koepka said. He tied for 13th in last year's Open at Oakmont. But now has the U.S. Open champion he knows that he chose the right career.
Bobby Jones may have known all things about golf but he didn't know this Open would be won, not lost, by a 27-year-old with the steely resolve to respond to Matsuyama's late challenge by dropping three straight birdies on him after he'd closed to within that single sliver of a stroke.
Koepka was the first to strike, making a birdie on the first to go to 12 under and take a share of the lead.
World number 22 Koepka was not really in the discussion before the start of the tournament at Erin Hills but was the picture of calm as he delivered a performance worthy of a seasoned major victor, with three consecutive birdies on holes 14, 15 and 16.
"Because we played Tuesday practice round together and, I mean, he watched me play". It lacked a number of big names we're used to seeing on the leaderboard on Dad's Day, though at least one of those, Mickelson, richly deserves celebrity dad of the year status for skipping this year's tournament to attend his oldest daughter's high school graduation. He also played in the U.S. Open previous year at Oakmont and missed the cut.
He was two back of Jordan Spieth and Bubba Watson heading into the last round at the 2014 Masters but shot 73 and never threatened.
Koepka shot 3-under on the front nine to put him at 14-under for the weekend, which established him as the favorite for much of the final round.
Koepka - like Jason Day, Danny Willett, Dustin Johnson, Henrik Stenson, Jimmy Walker and Sergio Garcia - is a bridesmaid no more.
Casey started eagle-birdie and finished with two birdies over the final four holes for his 66. The 20-year-old from Dallas finished as the leading amateur on the highly respectable 72-hole aggregate of one-under.
Scheffler plays for the University of Texas, and Champ plays for Texas A&M.
Thomas, fresh off his historic Saturday 63, couldn't back up his third-round magic.
Wisconsin native Steve Stricker fires a three-under 69 on each of the final two days of the championship, finishing at five-under and in 16th place.