It was the biggest winning margin in the world's oldest and most prestigious tournament since Tiger Woods won here by eight strokes in 2000.
The 27-year-old South African, a 200-1 betting shot on Wednesday, started the day on 15-under par, four strokes ahead of England's Paul Casey and with the rest of the field already left trailing in his wake.
Plotting his way around the Old Course links, Oosthuizen was never really threatened as he carded a closing 71 for a 17-under total of 272.
The runner-up spot, a distant seven strokes back, went to England's Lee Westwood who closed with a 70 with three players in a tie for third a stroke further back - Rory McIlroy (68), Henrik Stenson (67) and Casey (75).
"It's unbelievable," said Oosthuizen. "It was difficult having such a big lead to keep calm and focussed, but I kept calm all the way. It's just amazing.
"I felt like I played really well all week."
It was just the second top-level tournament win of Oosthuizen's career after the lowly Andalucia Open in March and it came on a day of celebration back home for Nelson Mandela's 92nd birthday.
The first words to come out of Oosthuizen's mouth at the presentation speech was to wish former South African president Nelson Mandela a very happy 92nd birthday.
Ranked 54th in the world coming into St Andrews, Oosthuizen was the fourth South African to win the Open after Bobby Locke (1949, 1950, 1952, 1957), Gary Player (1954, 1968, 1974) and Ernie Els (2002).
It was the biggest upset win in an Open at the Home of Golf since American Tony Lema won on his debut at the Old Course in 1964.
Oosthuizen carded superb rounds of 65, 67 and 69 to set up his winning position and only Casey with rounds of 69, 69 and 67 managed to hang onto his coattails.
Casey had an immediate chance to crank up the pressure on his more inexperienced playing partner when he hit his approach to within five feet at the first, but he pushed his putt wide.
The Englishman then bogeyed the second to provide Oosthuizen with the perfect start as he himself held firm with two pars to stretch his lead to five.
Casey had another chance to pull one back at the par-five fifth but again failed to sink a makeable birdie putt.
Ahead of them, no-one among the chasing pack was able to mount a charge.
Martin Kaymer of Germany, who had been in third place overnight at eight over, bogeyed the first, while Stenson of Sweden, Westwood and Alejandro Canizares of Spain all parred the first four holes when it was birdies they needed to stand any chance of reeling in the leader.
Casey did cut the lead to three when he birdied the sixth and Oosthuizen had his first of two bogeys on the day after over-hitting his tee-shot at the par-three eighth.
But on the next hole, Oosthuizen drove the short, par-four green and sunk a 30-footer for a crucial eagle, while Casey had to settle for a birdie. The lead was back to where it started at four over.
When Casey clattered his drive into thick gorse on the tricky par-four 12th minutes later and limped off with a triple bogey seven to Oosthuizen's birdie three, it was all over.
World number one Woods, whose hopes of an unprecedented hat-trick of Open wins at St Andrews evaporated with a disappointing 73 on Saturday leaving him 12 shots off the lead, had two double-bogey fours on the front nine.
He battled back to finish with a par 72, but at three under for the tournament he was way back in a tie for 23rd place, his dreams of a 15th major well and truly shattered.
"I drove it great all week, hit my irons pretty good, and I did not putt well except for the first day," he said.
"I believe I had like nine three putts for the week, so consequently I'm pretty far down the board."
Ulster young gun McIlroy, who opened with starkly contrasting rounds of 63 and 80, finished strongly with a 68 which left him tied for third.
"I couldn't help but think about Friday (80) going up the last hole there," he said.
"If I had just sort of stuck in a little bit more on Friday and held it together more, it could have been a different story. But the other three rounds I played very, very solidly."
Complete scores on Sunday after the final round of the British Open (-a denotes amateur):
272 - Louis Ooosthuizen (RSA) 65-67-69-71
279 - Lee Westwood (ENG) 67-71-71-70
280 - Rory McIlroy (NIR) 63-80-69-68, Henrik Stenson (SWE) 68-74-67-71, Paul Casey (ENG) 69-69-67-75
281 - Retief Goosen (RSA) 69-70-72-70
282 - Robert Rock (ENG) 68-78-67-69, Sean O'Hair (USA) 67-72-72-71, Nick Watney (USA) 67-73-71-71, Martin Kaymer (GER) 69-71-68-74
283 - Alvaro Quiros (ESP) 72-70-74-67, Jeff Overton (USA) 73-69-72-69, Luke Donald (ENG) 73-72-69-69
284 - Rickie Fowler (USA) 79-67-71-67, Tom Lehman (USA) 71-68-75-70, Charl Schwartzel (RSA) 71-75-68-70, Ignacio Garrido (ESP) 69-71-73-71, Jin Jeong (KOR -a) 68-70-74-72, Robert Karlsson (SWE) 69-71-72-72, Sergio Garcia (ESP) 71-71-70-72, JB Holmes (USA) 70-72-70-72, Dustin Johnson (USA) 69-72-69-74
285 - Trevor Immelman (RSA) 68-74-75-68, Graeme McDowell (NIR) 71-68-76-70, Steven Gallacher (SCO) 71-73-70-71, Tiger Woods (USA) 67-73-73-72
286 - Edoardo Molinari (ITA) 69-76-73-68, Matt Kuchar (USA) 72-74-71-69, Ryo Ishikawa (JPN) 68-73-75-70, Bradley Dredge (WAL) 66-76-74-70, Marcel Siem (GER) 67-75-74-70, Robert Allenby (AUS) 69-75-71-71, Adam Scott (AUS) 72-70-72-72, Kevin Na (USA) 70-74-70-72, Miguel Angel Jimenez (ESP) 72-67-74-73, Alejandro Canizares (ESP) 67-71-71-77
287 - Vijay Singh (FIJ) 68-73-76-70, Colm Moriarty (IRL) 72-73-72-70, Hunter Mahan (ENG) 69-76-71-71, Soren Kjeldsen (DEN) 72-74-70-71, Peter Hanson (SWE) 66-73-74-74, Ross Fisher (ENG) 68-77-68-74, Shane Lowry (IRL) 68-73-71-75
288 - Darren Clarke (NIR) 70-70-77-71, Bo Van Pelt (USA) 69-72-73-74, Camilo Vilegas (COL) 68-75-70-75, Ricky Barnes (USA) 68-71-72-77
289 - John Senden (AUS) 68-76-73-72, Simon Dyson (ENG) 69-75-73-72, Kim Kyung-tae (KOR) 70-74-73-72, John Daly (USA) 66-76-74-73, Stewart Cink (USA) 70-74-71-74, Phil Mickelson (USA) 73-71-70-75, Lucas Glover (USA) 67-76-70-76
290 - Danny Chia (MAS) 69-77-74-70, Simon Khan (ENG) 74-69-73-74, Zane Scotland (ENG) 70-74-72-74, Steve Stricker (USA) 71-74-71-74, Steve Marino (USA) 69-76-69-76
291 - Ian Poulter (ENG) 71-73-76-71, Jason Day (AUS) 71-74-75-71, Peter Senior (AUS) 73-71-74-73, Heath Slocum (USA) 71-74-73-73, Toru Taniguchi (JPN) 70-70-77-74, Y.E. Yang (KOR) 67-74-76-74, Tom Pernice (USA) 72-74-71-74, Marc Leishman (AUS) 73-71-72-75
292 - Colin Montgomerie (SCO) 74-71-74-73, Hirofumi Miyase (JPN) 71-75-73-73, Steven Tiley (ENG) 66-79-73-74, Fredrik Anderson Hed (SWE) 67-74-73-78
293 - Andrew Coltart (SCO) 66-77-74-76
294 - Mark Calcavecchia (USA) 70-67-77-80
295 - Richard S. Johnson (SWE) 73-73-76-73, Thomas Aiken (RSA) 71-73-77-74
296 - Zach Johnson (USA) 72-74-74-76, Scott Verplank (USA) 72-73-74-77
Louis Oosthuizen factfile:
Birth Date - October 19, 1982
Birthplace - South Africa
Age - 27
Height - 5'10" - 1.78m
Weight - 170 lbs - 72kg
Right-handed
Married with one child, wife Nel-Mare
Home - Pinnacle Point, South Africa
Turned professional - 2002
US PGA Tour victories - 1
European PGA Tour wins - 2
Other Victories - 4 on South African Tour
Wins in Majors - 1 British Open (2010)
Best world ranking - 15 (July 2010)