South Africa's chase didn't start well, Hashim Amla lbw to a lovely ball from Tim Southee and Faf du Plessis beaten and bowled by seamer Colin de Grandhomme.
However Quinton de Kock continued his good form from Hamilton last Sunday and set about laying the platform with JP Duminy, oddly promoted to No 4 ahead of captain AB de Villiers.
South African officials denied the change in batting order was to do with de Villiers having copped a painful blow on his right shoulder diving in the field during New Zealand's innings.
When he did arrive, after Duminy was easily stumped off Mitchell Santner, de Villiers took charge. De Kock hoisted a catch to deep mid wicket off Trent Boult but David Miller put on another 68 with de Villiers before being caught behind off legspinner Ish Sodhi.
South Africa needed 96 off the last 13 overs but the loss of de Villiers, hooking fractionally early at a Trent Boult short ball to be caught behind, started a slump.
South Africa lost three for 15 in 20 balls but Dwaine Pretorius, showing why he has a first-class average of 42, and Phehlukwayo, the hero of the first ODI win in Hamilton last Sunday, gave the tourists some late hope. They needed 33 off the last three overs, 20 off two before Trent Boult bowled Pretorius for a 27-ball 50.
Boult finished with three wickets, Santner took two and there was one each for Southee, de Grandhomme and Sodhi.
New Zealand's innings got off to a rocky start with Tom Latham failing again, his trough now lasting six innings - 22, 7, 4, 0, 0, 2 - since his 137 agains Bangladesh in Christchurch on Boxing Day.
However Dean Brownlie and Kane Williamson put on 40 before Williamson (69 off 75 balls) and Taylor shared a 104-run third wicket stand in 17.3 overs, scoring at a deceptively good rate.
When Williamson was caught at long on off legspiner Tahir, Taylor found a reliable ally in Jimmy Neesham.
The pair shared an unbroken 123-run fifth wicket stand, a record against South Africa.
Neesham finished on 71 off 57 balls while Taylor completed his record-setting 17th century, but left it until the absolute last, slapping Wayne Parnell to the boundary, and celebrating with a mighty swing of his bat.
He was brilliantly caught on the long on boundary on the penultimate ball by a diving Miller, who then had to throw the ball infield as his momentum took him to the boundary rope.
Those two runs took Taylor to 98 before he completed the job with a slap to the cover fence. He took 110 balls and hit eight fours.
Taylor and Neesham took 89 off the last 10 overs, 51 off the last five.
Pretorius did a good job with his medium pacers, taking two for 40 off 10 overs, while Parnell was steady.
The series now moves to Wellington for game three on Saturday.