The home team was in serious danger of losing the top spot after South Africa won the Nagpur Test last week and then bad weather on Wednesday allowed only 31 overs of play.
However, Harbhajan Singh took five for 59 and Amit Mishra bagged three for 78 as South Africa was bowled out for 290 despite a fighting 123 not out by Hashim Amla.
The victory ensured M S Dhoni's men retain the ICC Championships mace, which they won after beating Sri Lanka 2-0 in the home series in December last year.