Ryan Harris bowled Dale Steyn and Morne Morkel with the first and third balls of his 25th over as Australia won the match as well as the series by two Tests to one. (Agencies)
Steyn and Vernon Philander (51 not out) came together with 19.5 overs remaining and survived until Harris returned to the attack for a final burst.
Michael Clarke's side became the first team to win a series against South Africa since Ricky Ponting's Australians won by the same margin in South Africa in 2008/09.
South Africa will retain their number one position in the official Test rankings, but the defeat could signal the imminent end of an era, with captain Graeme Smith stepping down from international cricket.
Smith's retirement, announced after the third day's play, follows the retirement earlier in the season of star all-rounder Jacques Kallis, while long-serving wicketkeeper Mark Boucher was forced to quit through injury in 2012.
Australia, on the other hand, continued a resurgence under the leadership of Clarke and coach Darren Lehmann, following their 5-0 Ashes triumph against England earlier in the season.
When South Africa resumed on 71 for four it seemed unlikely they could pull off another great escape to go along with a draw they earned against Australia in Adelaide in 2011/12 and India in Johannesburg earlier this season.
But a succession of stubborn partnerships took the match down to the last five overs.
Ryan Harris bowled Dale Steyn and Morne Morkel with the first and third balls of his 25th over as Australia won the match as well as the series by two Tests to one.