Koepka posted a five-under-par 65 on Sunday while McIlroy could only manage a one-over 71 to finish five back at 11 under par in a tie for fourth - the seventh time he has failed to break 70 in the final round of his 13 PGA Tour events so far this season.
Webb Simpson’s six under was the best score of the day and saw him finish second while Marc Leishman also finished ahead of McIlroy in third on 12 under after a 67.
McIlroy began Sunday with a one-shot lead but his advantage evaporated early on day four as Koepka joined him at the top of the leaderboard after firing a birdie on the par-five third hole to grab a share of the lead.
The Northern Irishman made par on every hole on the front nine but found himself two shots behind Koepka at the turn after the four-time major winner’s back-to-back birdies at five and six.
McIlroy was by then joint second with Simpson, who was playing five holes ahead of the final pair and made a flying start with an eagle on the par-five third.
Koepka extended his lead with another birdie on the 10th before McIlroy’s challenge faded with his first dropped shot of the day at the 12th.
Another bogey on the par-four 15th left McIlroy on 11 under and four shots behind Koepka. The Northern Irishman had now been overtaken on the leaderboard by Simpson and Leishman and was tied for fourth spot with Tommy Fleetwood and Matthew Fitzpatrick, which was how he would finish.
Five birdies between the 10th and 16th holes had put Leishman in contention but the Australian gave two back with bogeys at 13 and 15.
Koepka maintained his three-shot advantage to clinch the title with a bogey-free round to finish on 16 under. PA