The 20-year-old, from Craigelaw less four miles from this year's venue Muirfield but studying at San Diego University, carded rounds of 67 and 65 to post an eight-under aggregate of 132.
That was good enough to top the leaderboard at Local Final Qualifying at Dunbar and claim one of the three available spots for the major.
There was no place for Colin Montgomerie, however, who finished well off the place at Gullane, the second of four venues being used to fill the last 12 places for The Open.
Forrest, studying a business course in America, is no stranger to big scoring having claimed his amateur crown last summer with a 9&7 match play victory.
"I still can't believe I've made it into Muirfield," said Forrest, who will play for Scotland in next week's European Team Championship in Denmark.
"It was my first attempt at qualifying so I didn't really know what to expect.
"I did have a huge piece of luck at the 17th where I chunked a chip.
"It hit the concrete path over the burn but bounced into a bunker and I got up-and down from there.
"I would have to admit that I was getting nervous by that point but I managed to birdie the last which was a bit of a relief."
The other two to secure their Open places at Dunbar were Australian John Wade and India's Shiv Kapur.
After an indifferent opening 70 45-year-old Wade, who took a holiday in order to play in qualifying, turned things around with seven birdies for a 63.
His seven-under total was matched by Kapur, who last played at The Open in 2006 when he came through international final qualifying in Asia and lost his European Tour card last year, after a second-round 64.
Kent professional Steven Tiley ensured a third Open appearance in four years with some impressive scoring at The Musselburgh.
The 30-year-old, whose first-round 66 at the 2010 Open at St Andrews hit the headlines until it was eclipsed by three by Rory McIlroy, was in top form.
He laid the foundations with a seven-under-par 64 and followed up with a 69 - registering 13 birdies over 36 holes - to book his place with a nine-under total.
Also qualifying three shots behind were Scot Lloyd Saltman, winner of the Silver Medal for leading amateur in the 2005 Open at St Andrews, and High Wycombe 21-year-old Tyrell Hatton, who played his first Open at the Old Course three years ago, who both finished six under.
"I've never played Muirfield so it's nice to know that I'm into The Open and for me it's easily the best tournament in the world," said Tiley.
"I've grown up playing links golf and it was just good to give myself a great chance with that 64 this morning.
"I did drop a few shots this afternoon but it was all just a matter of staying alive."
Saltman, who practises at nearby Archerfield Links, will play in his third Open.
"I'm just delighted big time to be back into The Open and especially Muirfield as I have been driving past every day and watching the stands going up," he said.
"All my Open appearances will have been in Scotland and I am very pleased with that.
"To be playing at Muirfield and just living 10 minutes down the road is amazing.
"I've only played there twice before and that's been in the winter when it's been freezing and with the ground solid."
Eight-time European number one Montgomerie admitted he blew his bid to return to The Open for the first time since 2009.
The 50-year-old Scot carded a second-round 76, having been in contention after an opening 69, to finish three over and four adrift of qualification.
"I got to five under and threw it away - nevermind," he said.
"The pace of play was shocking (his second round took four hours and 35 minutes) but that's not the reason I played badly."
Amateurs Ben Stow, from Rushmore in Salisbury, and 2012 British Boys champion Matthew Fitzpatrick, from Hallamshire in Sheffield, progressed from Gullane along with Sweden's Oscar Floren.
A calamitous error cost Irishman David Higgins a chance of qualification in a play-off at North Berwick.
The 40-year-old, from Waterville, lost after discovering a 15th club in his bag on the first extra hole.
He incurred a two-stroke penalty, just like Ian Woosnam in the final round of The Open at Royal Lytham in 2001, and as a result Gareth Wright, from West Linton in Edinburgh, and George Murray qualified along with Royal North Devon amateur Jimmy Mullen, whose six-under total after back-to-back 68s saw him finish top.