McCullum made 101 off 98 balls with seven fours and seven sixes as the New Zealanders scored 372 all out in reply to the Rest of South Africa's first innings total of 395. The Rest were 132 for four at the close on Sunday, an overall lead of 155.
McCullum and Chris Martin put on 95 for what was effectively New Zealand's last wicket in the absence of Shane Bond, forced out of the match with a knee injury.
New Zealand captain Stephen Fleming earlier completed a century after being 96 not out overnight. After scoring at a run a ball Saturday, Fleming was more subdued Sunday and it was Peter Fulton who was the aggressor, moving from 36 overnight to 73 before he was caught behind off Garnett Kruger.
Fulton and Fleming put on 183 for the third wicket.
Fast bowler Monde Zondeki caused a slide, taking three wickets in 10 balls, including those of Fleming and Jacob Oram off successive deliveries.
Fleming made 118 off 132 balls. It was his 28th first-class century.
The tourists were 277 for eight when McCullum was joined by Martin, regarded as one of the most genuine number 11 batsmen in world cricket, with a Test career average of 2.29 and a first-class average of 4.29.
Martin survived 41 balls, making nine not out, while McCullum went for his shots, at one stage hitting 18 off an over from Rory Kleinveldt.
Zondeki took four for 107 to be the most successful South African bowler.
Justin Ontong made an unbeaten 59 off 114 balls in the Rest of South Africa's second innings.