The scores were locked together for more than two overs, with NSW nine wickets down after Test spinner Nathan Lyon was run out going for the winning run.
Allrounder Sean Abbott finally tipped the result to the Blues with a single off Marnus Labuschagne after Swepson had earlier swept Queensland to within touching distance of a thrilling victory.
Swepson snapped up five wicket hauls in each innings to stamp himself the stand-out slow bowler in the Shield competition, finishing with 10 wickets for the match, the first time in his career that he has achieved such a milestone.
He became the first Queensland spinner in 41 years to complete the feat in a Shield game, with former Queensland leg-spinner (and current chairman of selectors) Trevor Hohns taking 11 wickets in a match against NSW at the SCG in 1979.
It came off the back of Swepson's match-winning effort against Tasmania in the opening round when he claimed fours wicket on the final day to secure a tense victory.
Queensland was storming home to another thriller today after NSW resumed at 3-71, still needing another 135 runs to win.
Swepson turned the momentum generated by not out pairing of Daniel Hughes and Daniel Solway when he produced a peach bowl left-hander Hughes.
Michael Neser then stepped up to remove top-scorer Solway for 52 and Queensland had the sniff of victory.
Swepson then set about taking on the lower order, removing Pete Nevill, Mitchell Starc and the Blues' bowling destroyer of yesterday Trent Copeland.
But the in-form Abbott, who is proving a dogged counter-attacker for NSW so far this season, held his nerve to nab the winning run.