In a match reduced by rain to 31 overs per side, left-hander Yuvraj finished the game by smashing Andre Nel for four with four balls to spare after India had slumped to 38 for three. His winning hit sparked a pitch invasion by hundreds of jubilant Indian fans.
Man-of-the-match Yuvraj had also seen India home to a six-wicket win on Friday, that had levelled the series, with 49 not out.
"Yuvraj's been exceptional," India captain Rahul Dravid told reporters. "He's been a fantastic finisher for us. It's not an easy job to do under pressure and he does it really well.
"He's got the power, he's got the skill and he's matching that power and skill with temperament, mental strength and brains.
"That's a deadly combination. He is up there among the best one-day players in the world without a doubt."
Yuvraj, a member of the India side that lost a one-day series in South Africa 4-0 in November and December last year, said: It gives you a lot of confidence when you win outside India."
Dravid added these matches had given India a timely boost ahead of Tuesday's one-dayer against arch-rivals Pakistan in Glasgow and, more significantly, the three Test and seven one-day internationals in England from July 19 to September 8.
"It's good we've played in tough conditions and done pretty well. That gives us confidence to take into the next series."
South Africa captain Jacques Kallis, who lost the toss and saw his side sent into bat, was left frustrated after another close finish. "We got ourselves into a position where we could have won that match. As much as the toss played a bit of a role, we also gave it way a little bit."
Justin Kemp's run-a-ball 61 was the top score in South Africa's 148 for seven after they'd collapsed to 28 for four having had the worst of the conditions after being sent in on a seaming pitch.
Kemp - fit after a thigh injury - and Herschelle Gibbs (56) revived the innings in a fifth-wicket stand of 99.
But India dropped Kemp on 10 and twice missed Gibbs in the 40s.
India, like South Africa, lost early wickets.
Man-of-the-series Sachin Tendulkar, who on Friday had become the first batsman to score 15,000 one-day international runs while making 93, after 99 in the opener, was caught behind by wicket-keeper Mark Boucher off fast bowler Makhaya Ntini for eight.
Gautam Gambhir, pulling, then played on to fast bowler Dale Steyn, one of several players on both sides who'd been struck down by a flu virus.
Then Sourav Ganguly was caught behind.
Dravid, together with Yuvraj who rode his luck, got India's target down to 64 runs off the last 10 overs.
Yuvraj edged India nearer with an elegant, straight-driven, four off Kemp, a member of South Africa's six-man all-seam attack.
Dravid followed up by pulling Kallis through mid-wicket for four.
But a stand of 70 ended when Dravid, idling over a single, was run out by Boucher's direct hit on the stumps at the non-striker's end.
Undaunted, Yuvraj lofted Steyn for a magnificent straight six and India needed under a run-a-ball.
Mahendra Singh Dhoni, who finished on 14 not out, kept up the momentum by carving and driving aggressive paceman Nel for two fours.
Yuvraj completed a 77-ball fifty with one six and four fours before nearly slamming a ball into Dhoni off Andrew Hall that raced to the boundary.
Ajit Agarkar, another 'flu victim, marked his comeback by removing opener Morne van Wyk and Kallis for nought apiece on his way to two for 21.
Former captain Ganguly followed up with two wickets in two balls.
Agarkar struck with his fifth delivery when van Wyk was lbw.
Then Kallis played inside the line of a superb delivery that cut away late and knocked back his off-stump.
AB de Villiers edged a ball from medium-pacer Ganguly onto his pad and keeper Dhoni, standing up to the stumps, ran round to take a catch. Next ball left-hander Jean-Paul Duminy was given out lbw.
Kemp survived the hat-trick with a single.
Gibbs, after his scares, completed a 59-ball fifty with a straight six off teenage leg-spinner Piyush Chawla before he was bowled by Zaheer Khan.
Kemp, who'd hit the first ball of the final over from Tendulkar for six, was bowled round his legs next ball by the part-time spinner.
South Africa travel to neighbours Zimbabwe for a one-day international series in August. They then host the inaugural World Twenty20 in September.