Tokelo Rantie and Percy Tau were the heroes as Bafana managed their first ever victory over the Super Eagles in a competitive match.
As expected, the home side took control of the game early on as they won a corner in as early as the third minute, with Erick Mathoho closing down Alex Iwobi on the by-line to block the attempted cross.
Three minutes later, Mathoho was called to deal with Moses Simon's cross from the right but he scuffed his clearance before Ramahlwe Mphahlele came to the rescue with a well-timed slide tackle inside the box.
Wilfed Ndidi powered his way into the box just after 10 minutes but his volleyed effort failed to trouble Itumeleng Khune, as it whisked past his goals.
Appeals for a penalty from Nigeria were then waved away by Tunisian refree Youssef Essrayri, after the ball hit Thulani Hlatshwayo's trailing arm following his attempted block inside the box.
Midway through the first half, Etebo Oghenekaro came closest for the Super Eagles as he ghosted into the box to get on the end of a cross, but his effort was poorly hit and trickled wide of the mark.
Hlatshwayo did a great job in reading an attempted through-ball as he intercepted a pass through the middle, with Kelechi Iheanacho making the run in behind.
Bafana's best chance came three minutes before the break as Tebogo Langerman did well down the left to whip in a cross into the box, with Daniel Akpeyi fumbling his catch and allowing Themba Zwane an open goal to aim at, but the winger somehow only managed to hit the upright.
Just under 10 minutes into the second half, Rantie opened the scoring with a glancing header at the near-post to give the visiting side the lead. Mphahlele's excellent delivery from the right made it easy for the striker.
The hosts almost came close to drawing level in the 78th minute when Mathoho's shocking attempted clearance resulted in a goalmouth scramble, but Ahmed Musa, Olarenwaju Kayode and Etebo Oghenekaro somehow failed to hit the target before Dean Furman was on hand to clear inches away from the goal-line.
Substitute Tau then doubled Bafana's lead seconds after replacing Rantie as Keagan Dolly's pin-point pass released the forward on a counter and, with Nigeria having commited numbers in attack, the forward cooly rounded Akpeyi to slot into an empty net with nine minutes to play.
Bafana were forced to drop deep to keep a resurgent Nigerian attack at bay, and could have added to the scoreline but Lebogang Manyama could not hit the target, with Tau and Themba Zwane combining well up front.
The visitors held on for a stunning victory as coach Stuart Baxter recorded his second win over the Super Eagles, with the last coming in a friendly international at the Ellis Park Stadium back in 2004.
This win sees South Africa move to second in the group, following Libya's 5-1 victory over Seychelles on Friday evening.
Nigeria next travel to Seychelles while Bafana host Libya in the second round of AFCON qualifying fixtures in March next year.
Nigeria: Akpeyi, Shehu, Awaziem, Ekong, Elderson, Onazi, Ndidi, Etebo, Simon, Iwobi (Musa 59'), Iheanacho (Kayode 71').
South Africa: Khune, Mphahlele, Langerman, Mathoho, Hlatshwayo (c), Furman, Zungu, Zwane, Dolly (Mabunda 85'), Vilakazi (Manyama 65'), Rantie (Tau 80').
Unused subs: Keet, Mobara, Gordinho, Jali.