NSW won by an innings and 133 runs with a day to spare in the match at the Sydney Cricket Ground on Saturday.
Tom Plant (125) and Callum Ferguson (103) pushed South Australia's overnight score of 123 for three to 251 for three with a 218-run partnership but MacGill ripped through the tail.
Needing 401 runs to make NSW bat again, SA were dismissed for 268.
MacGill finished with 5-73 as South Australia's last seven wickets fell for 17 runs.
In Melbourne, Western Australia survived a strong run chase to beat champions Victoria by 46 runs at the Junction Oval.
WA looked to have let the match slip when Victoria were cruising at 368 for four in pursuit of 455, but medium-pacer Kade Harvey made a breakthrough when he bowled Victorian skipper Cameron White (30).
Moments later Harvey had Victorian all-rounder Ian Harvey (eight) out lbw and from there the tail crumbled.
Victoria were all out for 408, with David Hussey left stranded on 109 after making a first-ball duck in the first innings.
Harvey finished with 4-89 and fast bowler Steve Magoffin got 3-49.