Koepka, whose third Challenge Tour win of the year on Sunday earned him instant "battlefield promotion" to the European Tour, sealed his place by winning International Final Qualifying at Sunningdale.
The 23-year-old carded rounds of 69 and 65 over the Old and New courses respectively to finish five under par, one shot clear of England's Oliver Fisher, who returned scores of 70 and 65.
France's Gregory Bourdy, England's Richard McEvoy, Spain's Alvaro Quiros and Northern Ireland's Gareth Maybin finished on three under, with Sweden's Niclas Fasth and Scotland's Scott Jamieson also qualifying on two under.
That left Ross Fisher, David Drysdale, Alejandro Canizares and Estanislao Goya - who all finished one under - in a play-off to claim the ninth and final qualifying place, with Goya coming out on top at the second extra hole.
Fisher and Drysdale were eliminated after bogeys at the first play-off hole and a par three on the next was enough for Goya to seal a trip to Muirfield after Canizares three-putted from just off the green.
Among those to miss out were England's Tom Lewis, France's Thomas Levet and Ryder Cup captains past and present Jose Maria Olazabal and Paul McGinley.
Lewis burst onto the scene with an opening 65 at Royal St George's in 2011, the lowest score by an amateur in Open history giving him a share of the lead.
The 22-year-old went on to finish 30th and win the silver medal as leading amateur before turning professional and winning the Portugal Masters in just his third event in the paid ranks.
A first round of 66 on the Old Course this morning gave him the clubhouse lead on four under par, but a second round of 75 saw him finish two over par.
Levet was part of a four-man, four-hole play-off with Ernie Els, Steve Elkington and Stuart Appleby the last time the Open was staged at Muirfield at 2002, eventually losing out to Els on the first hole of sudden death.
But consecutive rounds of 70 today saw him miss out on the play-off by two shots, while Olazabal and McGinley were both three shots further back.
After his win in the Scottish Hydro Challenge, Koepka managed just two hours' sleep before catching a 6:30am flight from Scotland to London.
But he showed no ill effects as he qualified for his second major championship after playing in the 2012 US Open as an amateur.
"I was in a lot of heather (rough) today and I kind of felt like I was in it all day," he said. "I didn't hit it that great but I just tried to relax and hang in there. I putted really well and made some key putts on the second 18.
"It's awesome to play in The Open, it's what you prepare your game to play in. Any Major is special but The Open is up there. Everybody wants to win it."
Fisher was relishing the prospect of playing in his second Open after appearing at Turnberry in 2009. He said: "I haven't played at Muirfield before but I watched Ernie Els win in 2002 and Nick Faldo also won there. I can't wait to play there. I'm really pleased with my day's work."
Argentina's Goya, who also came through a play-off to qualify for the US Open at Merion, said: "I can't believe it. I started the year not very good so to be able to play my second major of the year is something hard to describe.
"There is always pressure when you are trying to qualify for something as big as The Open. I had experience at Walton Heath and made it through the play-off there to get into the US Open. I owe it to a lot of people so I am very happy for all of them as well."