An unbeaten 185-run stand between Rohit and Rahane helped the hosts recover from three early wickets.
India record 11 home series wins in a row after being asked to follow on, South Africa folded for 189 in their second innings
Keshav Maharaj and Vernon Philander added 109 runs for the ninth wicket before India bowled out South Africa for 275.
The Indian skipper struck a career-best 254 not out as India declared their first innings on 601 for five.
Mayank Agarwal departs after his second hundred during India against South Africa on first day of second Test at Pune.
Shami (5-35) and Jadeja (4-87) give India 1-0 lead after late South Africa resistance.
India took apart South African spinners to finish with 27 sixes in the match, five more than any team has ever hit in a Test
Dean Elgar, Quinton de Kock defy odds, stats to overcome R Ashwin-Ravindra Jadeja in memorable batting display.
Hosts pile up 502 for 7 in first innings before calling a declaration on Day 2.
Rohit stayed unbeaten on 115 and Mayank on 84 before rain washed off the final session in first day of opening day.