South Africa, who were set a target of 410, were 128 for four in their second innings at lunch on the final day.
The home side lost four wickets for 31 runs in the space of 13 overs.
Warne came on to bowl in the second hour of the day's play, and he struck with his fourth delivery when AB de Villiers over balanced while lunging forward to try and smother a leg-break.
De Villiers missed the ball and was stumped by wicketkeeper Adam Gilchrist for 46 to end an opening stand of 91 shared with Graeme Smith.
Warne removed Smith four overs later when the lefthander swept at a leg-break and was caught off the glove by Justin Langer at leg slip for 40.
Jacques Kallis, the mainstay of South Africa's batting order, scored seven before he swept at a delivery from Warne that hit his back leg and was trapped in front.
South Africa slumped to 122 for four an over later when Herschelle Gibbs (17) fended a rearing delivery from fast bowler Stuart Clark to Warne at slip.
At lunch, Ashwell Prince had yet to score and Jacques Rudolph was six not out.
Warne, who bowled to a field that bristled with men at silly mid-off, silly point, slip, leg slip and forward short leg, took three for 16 from nine overs.
South Africa's main remaining hope of survival would seem to depend on the weather.
A 30 percent chance of rain was forecast for Durban today and heavy cloud hung over the ground.
Australia won the first Test in Cape Town by seven wickets to take a 1-0 lead in the three-match series.