South Africa scored 165 for five in an innings reduced to 19 overs a side after the floodlight failure caused a 50-minute delay, leaving New Zealand a revised target of 169.
The Proteas were 128 for two after 16.1 overs when the lights on one of four towers went out
Henry Davids hit 55 and captain Faf du Plessis made 63. New Zealand seam bowler Doug Bracewell took three wickets in four balls in the final over to finish with three for 33.
Du Plessis, who made his runs off 43 balls, shared partnerships of 68 for the second wicket with Davids and 79 for the third wicket with David Miller, who hit 33 off 18 deliveries.
Davids, playing in his second international match, made a maiden fifty before falling to a sensational catch by Jimmy Neesham, running back and diving full length to hold a lofted drive just inside the long-off boundary. Davids faced 38 balls.
South Africa won the first match by eight wickets in Durban on Friday.