Rilee Rossouw (75) gave South Africa a solid start with Quinton de Kock (22). He collaborated with Faf du Plessis to lay the platform for a big score.
JP Duminy and du Plessis scored 150 runs for the third wicket to lift the team to 361 for 6.
Faf du Plessis became the second player to score a century in all three formats as a captain before he was dismissed for 111.
Dale Steyn and Kagiso Rabada gave the hosts the perfect start with a wicket each. Australia resisted for a while but were reduced to 87 for 4 in the tall chase.
David Warner resisted for a while and scored a 56-ball 50 but with wickets tumbling from the other end, he was left with too much to do.
Wayne Parnell ran through the middle-order to leave Australia reeling at 185 for 7.
Travis Head top-scored with 51 but the top order collapse meant Australia sinked to a 142-run loss.