Chasing a mammoth target of 481 runs, the visitors were bowled out for 143.
For South Africa, AB de Villiers was the highest scorer with 43 runs off 297 balls.
He was assisted by pacer Umesh Yadav (3/9 in 21 overs) and left-arm spinner Ravindra Jadeja (2/26 in 46 overs).
India won the first Test by 108 runs at Mohali and the third match by 124 runs in Nagpur. The second match at Bengaluru was rained off.