Two tries in the final 10 minutes have seen the All Blacks break their losing streak, with victory over the Springboks at Ellis Park.
New Zealand seemed on their way to another disappointing collapse, but surged late to secure the 35-23 win, open their 2022 Rugby Championship account and keep the Freedom Cup.
Reminders of the defeat at Mbombela just a week ago showed in the opening minute, when All Blacks fullback Jordie Barrett was unable to field a Springboks up-and-under.
The All Blacks tried to spread the ball quickly to counter the South African rush defence, but Will Jordan's long pass over the top could only roll into touch.
New Zealand found their feet, launching their first meaningful attack through Ardie Savea, who was the recipient of a clever crossfield kick, before beating a couple defenders.
A scrambling Springboks defence struggled to get back and fullback Damian Willemse was shown a yellow card for impeding at the breakdown.
The All Blacks opted for the lineout and won another penalty at the ruck, before a free-kick went against them at the scrum.
The Springboks seemed to score a try against the run of play, but for a desperate tackle by Barrett on Pieter-Steph du Toit.
The flanker found Lukhanyo Am off the ground in support, but he was held up over the tryline to force the dropout.
The All Blacks continued their resurgence at the set-piece, winning a penalty at the scrum, after Frans Malherbe went down.
New Zealand continued to pepper the South African defence down the loose channels, with Jordan and Rieko Ioane linking up well down the right wing.
South Africa were guilty of infringing, as they tried to get back in numbers, which allowed Mo'unga to open the scoring with a penalty goal.
Stampeding winger Caleb Clarke continued his fine form since returning to the No.11 jersey, busting through the middle of a tiring Springboks defence.
The All Blacks showed great patience, switching direction to the right to Jordan, who held the ball up just enough, before sending captain Sam Cane over in the corner for the first try.
The Springboks' troubles at set-piece led to mass changes inside the opening 35 minutes, with Ox Nche, Joseph Dweba and Duane Vermuelen all replaced.
All Blacks hooker Samisoni Taukei'aho then crossed for his side's second try, after relentless phases of attack, as he rolled out of a tackle to touch down.
But South Africa responded almost immediately, with centre Lukhayno Am showing clever feet to step out of a Clarke tackle and score in the corner.
The Springboks completed the momentum swing with a Handre Pollard penalty goal inside his own half to reduce the All Blacks lead to 15-10 at halftime.
Ill-discipline continued to plague the men in black in the second half, with prop Ethan de Groot penalised for a no-arms tackle, which allowed Pollard to kick the penalty.
South Africa seemed to have been playing with a second wind, but were thwarted by Ioane, who did well to cover Am and intercept his pass to an open Willie le Roux.
Mo'unga got one penalty kick back for the All Blacks, before a great tackle by Clarke on Am kept Willemse from securing the loose ball for the try.
The Springboks seemed in again, but were called back after Hendrikse was deemed to have obstructed Sam Whitelock in the lead-up to Mapampi's would-be try.
But Mapimpi finally crossed just moments later, after Malcom Marx won the turnover and Willemse found his winger in support with a cutout pass.
The All Blacks looked dead and buried, after replacement Beauden Barrett was shown a yellow card for impeding Hendrikse, as he chased the loose ball.
Pollard nailed the penalty to give South Africa the lead for the first time in 68 minutes of the test match, but a length-of-the-field attack saw New Zealand retake the lead through David Havili, after another sensational run by Ioane.
The All Blacks sealed the victory through Scott Barrett, who crashed over right before the hooter to silence the Ellis Park crowd.
All Blacks 35 (Cane, Taukei'aho, Havili, Scott Barrett tries; Mo'unga 3 conversions & 3 penalties) Springboks 23 (Am, Mapimpi tries; Pollard 2 conversions & 3 penalties)