The length ball swung down the leg side as Elgar tried to glance it away.
However, the ball kissed the bat and Jos Buttler took an easy catch behind.
Anderson gave England the perfect start to build upon on Boxing Day.
Anderson joins this list after a special feat
The senior pacer became the fifth bowler in this decade to take a wicket on the first ball of a Test match.
The others to achieve the mark are, Suranga Lakmal vs KL Rahul, Kolkata, 2017 , Mitchell Starc vs Dimuth Karunaratne, Galle, 2016 , Suranga Lakmal vs Chris Gayle, Pallekele, 2010 and Dale Steyn vs Andrew Strauss, Johannesburg, 2010.
Elgar scripts an unwanted record as well
Meanwhile, Elgar scripted an unwanted record, The opener became only the fourth South African batsman to be dismissed on the first ball of a Test match.
This happened after a period of 21 years. Earlier, Gary Kirsten was dismissed by West Indian Curtly Ambrose at Cape Town.
Jimmy Cook and Eddie Barlow are the other two South Africans in this unwanted list.
SA vs ENG
England on top against the Proteas
England were on top of the first session today.
South Africa were reeling at 79/3 at lunch.
Besides Anderson, the likes of Sam Curran and Stuart Broad claimed key scalps.
For the Proteas, Zubayr Hamza scored 39.
Faf du Plessis is at the crease and the Proteas skipper has a lot of work to do post the lunch session.