Dale Steyn became the second South African bowler to claim 400 Test wickets on Thursday.
In the fifth over of the day, Tamim (6) slashed at a wide Steyn delivery and the edge was pouched by Hashim Amla at first slip as the paceman joined compatriot Shaun Pollock (421) in the 400-wicket club in his 80th Test.
Steyn, who has played 80 Tests since his debut against England in 2004, and fellow seamer Vernon Philander were drafted back into the Test squad having been rested during their 2-1 ODI defeat to Bangladesh.
Bangladesh overcame the loss of Tamim Iqbal to reach 75 for one at lunch on the opening day of the second and final Test.
Imrul Kayes was batting on 28 at the break with Mominul Haque on 35 after skipper Mushfiqur Rahim won the toss and opted to bat at Mirpur's Shere Bangla National Stadium.
On a high after winning the ODI series against the Proteas and holding them to a rain-affected draw in the first Test, Bangladesh enjoyed an excellent morning session despite the early loss of Tamim.
In a rare moment of discomfort, Mominul received a nasty blow on the helmet as he tried to duck under a short Morne Morkel delivery.
The left-hander soon shrugged it off and remained not out after hitting five boundaries in his fluent knock, while Imrul looked firm at the other end.