The 27-year-old started the final day of the 139th Open, where scoring was difficult, with a four shot lead.
Playing partner and closest challenger Englishman Paul Casey had the gallery right behind him from the first tee. The turning point, it seemed, came on the eighth hole. Oosthuizen three-putted for bogey, and the door was left wide open for Casey to make a short birdie putt.
Casey missed and was still behind by three.
Oosthuizen responded to his first drop shot of the final round by slamming the door shut on the field when he holed a lengthy eagle putt on the ninth to go out in one under par, extending his lead again to four shots.
The smiling Oosthuizen held his nerves and never looked under pressure in the biggest tournament of his career.
He continued to extend his lead on the back nine when he birdied the 12th as disaster struck for Casey, who drove into thick bush and ended the hole with a triple bogey seven.
Oosthuizen dropped a shot on the famous road hole 17th, but by that time he already had one hand on the Claret Jug with a lead of seven shots and one hole to play. Watched by his wife and fellow South African Charl Schwartzel on the 18th green, Oosthuizen finished off an exemplary display of links golf as he made par to win the oldest championship in the sport.
Speaking afterwards, the softly spoken South African thanked his parents and countryman Ernie Els for the support they had given him through his career.
It was Oosthuizen's second victory on the European tour, with his first coming earlier this season at the Open de Andalucia de Golf in Malaga, Spain.
The Open de Andalucia de Golf is a European Tour men's professional golf tournament which was played for the first time in 2007.