South Africa powered to 270-7 on the back of Quinton de Kock’s 103 and then restricted the hosts to 252-6, despite half-centuries from Rohit Sharma (65) and Virat Kohli (77).
Fast bowler Morne Morkel claimed four wickets.
The tourists had won the first match in Kanpur by five runs and India drew level in Indore with a 22-run victory.
The fourth match will be played in Chennai on Thursday.