The winger crossed in the 29th, 61st, and 79th minutes, adding to scores by full-back Zane Kirchner and flanker Francois Louw at Loftus Versfeld, where Australia have not won now in six visits.
The Wallabies struggled with a raft of injuries but pulled a second-half try back through replacement Mike Harris.
Habana took his Test try tally against Australia to nine as the Springboks benefited from an open, attacking game plan in perfect conditions.
Having scrambled over from close range for his first, the Springboks’ record try scorer broke clear after a quick lineout he took himself to run 40 metres and score again in the second half. Habana capped the five-try victory when he finished off a long-range counter-attack with a minute to go.
Kirchner touched down for South Africa’s first in the 22nd minute and Louw barged over from a rolling maul in the 54th.
The 20-year-old Johan Goosen missed his first two kicks at goal to be pulled from kicking duties, but sparked the Springbok backline with the ball in hand for the two first-half tries. The young 10 helped create the overlap for Kirchner to go in for the first points in the 22nd.
Goosen almost scored himself in the same right corner three minutes later, Pat McCabe’s desperate cover tackle stopping him just short. Habana went over after Goosen again threatened twice either side of the breakdown ten metres out. Scrum-half Ruan Pienaar eventually made the telling half-break around the fringe of a ruck and slipped a short pass for Habana to dive over.
Pienaar converted for 14-0 as Australia’s backline struggled badly with injuries. McCabe, winger Digby Ioane, fullback Berrick Barnes and Ashley-Cooper all went off for treatment in the first 40, with Barnes and Ashley-Cooper having to be replaced permanently. Kurtley Beale gave Australia their only points of the half with a 35th-minute penalty, but it was a brief respite. Ashley-Cooper was knocked unconscious in a tackle on Kirchner just before half-time that saved another try.
The move was again inspired by Goosen, who sent captain Jean de Villiers away down the right before Kirchner was forced to step into touch by a brave effort from Ashley-Cooper just before he grounded the ball.
Louw scored after a maul from a lineout splintered the Australian forwards. Habana scored his second try when he threw a quick lineout to hooker Adriaan Strauss, who passed back to see the speedster burst clear from about 40 metres out and go in under the bar.
Australia responded five minutes later as Beale finally had good ball to work with deep in South Africa’s territory. He looped around cleverly, shrugged off a South African tackler and put replacement Harris away in the right corner.
But Habana scored his third try with a minute to go when he again used his pace down the right wing.