Mohammad Abbas got Thenius de Bruyn caught behind off a bouncer early on in the low chase of 41.
Hashim Amla retired hurt after being hit on the inner side of the bicep by Mohammad Amir.
Dean Elgar wrapped up the chase with ease with a couple of boundaries, as South Africa chased the target down within 10 overs to pick up a series win with one Test to play.