Steyn took six for eight in 8.1 overs as Pakistan were shot out for just 49, the lowest total in their Test history, worse than the 53 they scored against Australia in Sharjah in 2002/3.
It was the third time South Africa had dismissed a team for less than 50 in the last two seasons. Only England, against Australia in 1887/88 and twice versus South Africa in 1888/89, have done this before.
South Africa bowled Australia out for 47 at Newlands in November 2011 and New Zealand for 45 at the same venue last month.
Pakistan’s 49 is also the lowest ever Test score at the Wanderers, the previous worst being 72 by South Africa against England in 1956/57.
Steyn’s magnificent swing bowling, backed by two wickets apiece from Jacques Kallis and Vernon Philander, gave South Africa a 204-run first-innings lead and, after declining to enforce the follow-on, they cruised to 207 for three in 53 overs before stumps.
Coming into bat soon after lunch, Steyn taking the last three Pakistan wickets without conceding a run, openers Graeme Smith (52) and Alviro Petersen (27) were quickly into their stride as they compiled an opening stand of 82 in 21 overs.
Umar Gul removed both openers just four overs into the post-tea session and South Africa then slipped to 99 for three when Jacques Kallis (7) skied an attempted sweep off Saeed Ajmal into the hands of Asad Shafiq at deep midwicket.
But Hashim Amla and AB de Villiers attacked to great effect as they added 108 off 159 balls before stumps, both completing unbeaten half-centuries.
Pakistan had begun the second day on six without loss after making a fine start to the series on day one, but their first innings was a procession of batsmen as Steyn took advantage of their lack of footwork in bowler-friendly conditions.
He ripped through the top-order with ease, having Mohammad Hafeez (6) caught behind off a superb away-swinger, trapping Nasir Jamshed (2) lbw and then having veteran Younis Khan caught in the slips for a duck in his first two overs.
Kallis then removed Azhar Ali (13) and Pakistan captain Misbah ul-Haq (12) with aggressive short-pitched bowling, before an incisive two-wicket burst just before lunch by Philander reduced the visitors to 40 for seven at the break.
Steyn then made an impressive return after lunch, having Saeed Ajmal caught behind off a precise away-swinger and then snaring Sarfraz Ahmed in his next over, wicketkeeper AB de Villiers again taking the catch.
Rahat Ali was then caught at fourth slip by Faf du Plessis for a duck off Steyn to complete a top-class catching display behind the wicket by South Africa, wicketkeeper De Villiers finishing with six catches, a career-best that equalled the national record shared by Denis Lindsay and Mark Boucher (four times).