Marsh, who arrived only on Sunday as an emergency replacement for the injured Shane Watson, was on 122 not out from 232 balls, and will resume at SuperSport Park on Thursday with Steven Smith, unbeaten on 91.
The pair put on an unbroken fifth-wicket partnership of 199 to steady the tourists, who had been 98-4 just after lunch.
Marsh, beset by injury problems and a lack of runs over the past year, was something of a gamble by the Australian selectors, but after offering a difficult catch on 12, he saw off South Africa's vaunted attack on a piping hot day.
It was his second Test century, after his first on debut against Sri Lanka in 2011.
Smith provided ample backing, matching Marsh with 12 fours in his innings.
The pair pushed the run rate up considerably after an uneasy start for the tourists, who were 83 for three at lunch and then lost captain Michael Clarke soon after.
Clarke was caught at deep fine leg off a short delivery from Dale Steyn for 23 as the much-anticipated clash between the highly rated batsman and bowler went Steyn's way. But it was one of few highlights for the quicks on a fast track.
Early on it looked as if South African captain Graeme Smith had made the right decision by asking Australia to bat, but by the end of the day that was in the balance. He had admitted at the toss he was uncertain.
After a fast start from Australia, South Africa removed both openers quickly to leave the tourists on 24-2.
First David Warner (12) chopped a Steyn delivery on to his stumps, before Chris Rogers (four) was brilliantly caught by a diving JP Duminy at short leg off a rising Morne Morkel ball that rapped him on the gloves.
Debutant Alex Doolan (27) was out 15 minutes before lunch, caught at mid-wicket by Robin Peterson as he tried to pull Ryan McLaren to the on-side.
South Africa's best bowling return came from Steyn, with two wickets for 54.
Image: Shaun Marsh
Photograph: Morne de Klerk/Getty Images