England, set a target of 175, were on course for a series-clinching win while Jason Roy (67) and Jonny Bairstow (47) shared a second-wicket stand of 110.
But when Roy was controversially given out obstructing the field — the first time this had happened in a T20 international — after being hit by a throw from the deep, having veered off his original course running between the wickets, the innings fell away.
England’s cause was not helped by batting second under increasingly dark skies in a match that started at 1600 GMT despite a lack of floodlights on the ground, although home skipper Eoin Morgan did opt to field first after winning the toss.
A target of 12 off the last over became four off the last ball after Liam Dawson hit Andile Phehlukwayo for a boundary.
But he could not repeat the trick and South Africa had a narrow win.
The series concludes at Cardiff on Sunday.