The part-time left-arm spinner, who had managed just six wickets in 17 previous Tests, grabbed four for 22 runs as India lasted just 68 overs before being dismissed after tea.
South Africa were themselves reduced to 9-2 in reply before ending an eventful day's play on 28 without further loss at the I.S. Bindra stadium.
Dominant South Africa seek India's Test scalp
Off-spinner Ravichandran Ashwin claimed Stiaan van Zyl leg-before for five and left-arm slow bowler Ravindra Jadeja bowled Faf du Plessis for no score with his second delivery.
Elgar (13 not out) and skipper Hashim Amla (nine not out) warded off the immediate threat from the Indian spinners to ensure there were no further setbacks for the tourists.
Opener Murali Vijay was the lone top-order Indian batsman to offer resistance, making 75 before he was sixth out, leg-before while trying to sweep off-spinner Simon Harmer.
India, S. Africa rivals play down pitch worries
India were reduced to 154-7 before Jadeja (38) and Ashwin (20 not out) lifted the total with a 42-run stand for the eighth wicket.
South Africa showed why they are the number one Test side as they claimed three wickets in the morning session after India won the toss and gained the advantage of batting first on a dusty, dry pitch.
The first wicket fell before a run had been scored when Shikhar Dhawan hung his bat out to a swinging ball from Vernon Philander and edged a catch to Amla at first slip.
No pitch worries for India, South Africa
Cheteshwar Pujara and Vijay retrieved the situation with a 63-run partnership for the second wicket when Elgar stepped up with the ball and, an over later, with a low catch to make it 65-3.
Elgar trapped Pujara leg-before for 31 with his fourth delivery when he was summoned by Amla to bowl the 22nd over.
Four balls later, Elgar dived in the covers to remove Indian captain Virat Kohli for one on his 27th birthday -- also giving debutant fast bowler Kagiso Rabada his first Test wicket.
India, who went to lunch at 82-3, were set back once again by Elgar who took two wickets off successive deliveries spread over two overs to reduce the hosts to 102-5.
Both Ajinkya Rahane (15) and Wriddhiman Saha (0) were snapped up by Amla in the slips, but Ravindra Jadeja denied Elgar a hat-trick by defending the next ball.
Elgar claimed his fourth wicket when Amit Mishra holed out to Dale Steyn in the deep, soon after Vijay was dismissed.
Leg-spinner Imran Tahir, who was brought on as the sixth bowler, bowled Umesh Yadav and last man Varun Aaron in the space of four balls to terminate the innings.
India went in with three spinners and two fast bowlers on a dry pitch, which is expected to break up as the match progresses.
The Proteas were without the injured Morne Morkel for the first match in the four-Test series, allowing 20-year-old Rabada to make his debut.
Rabada joined Steyn and Philander in a three-man pace attack, supported by two specialist spinners in Tahir and Harmer.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ