Elgar, axed from Cricket South Africa's central contract list on Tuesday, was called on to open the batting against Australia in place of Alviro Petersen (gastro) on Thursday.
The 26-year-old played astutely on a slow-and-low Port Elizabeth pitch, scoring 83 and sharing partnerships of 112 and 48 with Faf du Plessis and AB de Villiers respectively.
But just as the hosts looked destined to finish day one on top, Elgar and debutant Quinton de Kock threw away their wickets with cheap dismissals that showed flagrant disregard for the state of play.
Elgar, who made a pair on Test debut against Australia in 2012 when Mitchell Johnson twice dismissed him at the WACA, attempted to hoike Nathan Lyon into the stands but instead a skied edge was snaffled by Ryan Harris.
De Kock's dismissal was far worse.
The 21-year-old's eyes lit up at the sight of Steve Smith's first over of leg spin, but another poorly chosen stroke resulted in a further skied edge that sailed straight to substitute fielder Moises Henriques at mid-off.
Lyon earlier broke the Proteas' best partnership of the series when he removed du Plessis for 55 with the first ball after the second-session drinks break.
Australia are set to take the second new ball on day two with de Villiers (51), who continued his remarkable form to make it 12 consecutive Tests where he's posted at least a half-century, and JP Duminy (2) at the crease.
Play finished 19 minutes early due to bad light after dark clouds blanketed the field all day. Umpires later announced 95 overs would be scheduled for the second day.
Honours were shared, with the Proteas' run-rate as slow as the wicket.
Johnson, so potent on a bouncy Centurion pitch where he claimed career-best match figures of 12-127 in the first Test, adapted well early.
The left-armer pitched the ball up more and made the most of overcast conditions to trap Hashim Amla lbw for a duck in the sixth over as the home side slumped to 2-11.
Ryan Harris accounted for Graeme Smith (nine) in similar fashion in the fifth over.
Smith opted to bat first despite the swing-friendly skies and insisted it had nothing to do with his regrettable decision to send the visitors in for the three-Test series opener, where Australia sauntered to a 281-run win.