Hayden was out in the second over before a run had been scored but Justin Langer and captain Ricky Ponting repaired the damage.
Ponting could have been caught when he had scored five, with the total on 13. He gloved a ball from Makhaya Ntini down the legside and wicketkeeper Mark Boucher could not hold a relatively easy chance.
Hayden was out to the second ball he faced when he played at a wide delivery from Ntini and edged a catch to AB de Villiers at third slip.
With his side leading 1-0 in a three-match series, Ponting decided to bat after winning the toss on a warm, sunny day. Australia retained the side that won the first Test in Cape Town by seven wickets inside three days.
South African all-rounder Shaun Pollock returned to the South African team in place of Andrew Hall after missing the first Test because of a back strain.
Pollock bowled tidily on a pitch which offered pace and bounce but he and the other South African bowlers sent down too many deliveries which the batsmen did not have to play.
Ponting batted aggressively early in his innings as he and Langer posted a fifty partnership in 53 minutes but the scoring rate slowed in the second hour with Jacques Kallis conceding only three runs in six overs.