Franklin (47 not out) hit the winning runs with a four amid a flurry of late-order boundaries as New Zealand reached 209 for nine in reply to the home side's 208.
South Africa had set a disappointing total from 46.2 overs despite Faf du Plessis top-scoring with 57. Debutant New Zealand paceman Mitchell McClenaghan claimed four for 20.
Ryan McLaren took four for 46 for the home side but Franklin and BJ Watling (45) ensured New Zealand recorded a narrow victory.
McClenaghan and his fellow bowlers were on the money from almost the first ball and should have taken a first-over wicket, with Graeme Smith lucky to see his top edge off Kyle Mills put down by Rob Nicol at first slip.
Hashim Amla went lbw in the fifth over, misjudging the line as he went to drive Mills, and Smith was soon on his way as well, McClenaghan's first one-day wicket being one to savour as he pinned the former Proteas captain bang in front.
McClenaghan then took care of AB de Villiers, again finding the pads, with the batsman unhappy as replays showed the ball had pitched outside the line. Colin Ingram progressed to 29 and looked well set but he was soon heading back to the pavilion too, Nathan McCullum producing a superb catch as he ran backwards.
Franklin lured Quinton de Kock into a rash shot, with Nathan McCullum displaying excellent hands as he dived in from mid-off, and McLaren was caught behind off Kane Williamson for 33.
That brought Robin Peterson to the crease but he only lasted four balls for a duck - McClenaghan again on the spot for an lbw - while the same man did for Dale Steyn's middle stump after Williamson had removed Du Plessis. However, Rory Kleinveldt clubbed Mills for three sixes in four balls in a rapid 26.
New Zealand lost wickets at regular intervals during their run chase - Lonwabo Tsotsobe and Kleinveldt chipping with two wickets each for the hosts - but Watling stood firm before Franklin saw them home.
- Sports & Recreation