New Zealand were 265 for six at the close on Thursday, with Fleming on 114 not out. It was his first century in 12 Tests against South Africa and the ninth of a 101-Test career.
Fleming and c (50) shared a fourth wicket stand of 102 but the day's honours were shared, with South African fast bowler Makhaya Ntini taking three for 65 to keep the home side in contention, with the second new ball due after two overs on the second day.
South African captain Graeme Smith's decision to send New Zealand in was surprising on a pitch which held no terrors for the batsmen.
After the start was delayed by 30 minutes by morning dew, South Africa were unable to make an early breakthrough, with Michael Papps and Peter Fulton putting on 50 for the first wicket.
But three wickets fell for 32 runs to give the home side the edge before Fleming and Astle came together.
Astle seemed fortunate when he was on nine and the partnership was worth 17 when he appeared to edge a ball from Andre Nel to wicketkeeper Mark Boucher. Although Nel and the slips cordon went up in appeal, umpire Mark Benson gave Astle not out.
Fleming, meanwhile, batted with determination to back up his call for New Zealand to bat better than they did in the first Test at Centurion, where South Africa won by 128 runs.
He reached his half-century after batting for 161 minutes and facing 109 balls.
Fleming batted with increasing fluency to notch his century off 190 balls with 14 fours. When bad light ended play after 78 overs he had faced 202 deliveries and added another two boundaries.
Andre Nel claimed the only wicket of a shortened morning when he bowled Michael Papps for 22.
Nel played in place of all-rounder Shaun Pollock, who was a late withdrawal from the South African team because of lower back pain.
Dale Steyn had Peter Fulton caught behind for 36 eight balls after lunch and Ntini had Scott Styris caught at first slip for 11. Ntini earlier felled Styris with a ball which struck the left earpiece of his helmet.
Ntini ended New Zealand's most productive partnership when he trapped Astle leg before.
Fleming then made his only serious error of the day when he called Jacob Oram for an unlikely single and Oram was run out by a throw from Ashwell Prince at backward square leg.
Ntini claimed the wicket of Brendon McCullum shortly before the early close.
Nel's inclusion gave South Africa a potentially potent pace attack as he joined Ntini and Steyn, who shared 17 of the 20 wickets when South Africa took the lead in the three-match series.
But if Smith expected to blast through a seemingly fragile New Zealand opening pair he was disappointed as the pitch played placidly.
Papps was playing in place of Hamish Marshall, who suffered a rib injury while batting against Ntini in the first Test.
New Zealand awarded a first Test cap to off-spinner Jeetan Patel, 25, who joined left-armer Daniel Vettori in a two-pronged spin attack. Patel replaced Kyle Mills.
South Africa selected Hashim Amla to bat at number three, with Boeta Dippenaar opening in place of Herschelle Gibbs, who was dropped.
Without Pollock having played in 100 Tests and Gibbs in 77, South Africa went into the match with one of their least experienced teams for some time, with Nel and Amla having 21 and three caps respectively.