First half goals by Guly Do Prado and Jonathan Forte, together with a late strike from Ricky Lambert were enough to book Saints' passage into round three where they will meet either Charlton or Preston.
Swindon pulled a goal back late on through Mehdi Kerrouche before Lambert put the game beyond the home side.
Swindon manager Paolo Di Canio was involved in a heated confrontation with striker Leon Clarke after the game.
The hot-headed Italian could be seen remonstrating with forward Clarke as the team left the pitch.
The former West Ham striker appeared to manhandle Clarke towards the tunnel and the pair seemed to be pushing and shoving before being separated.
An injury time winner by Stephen Dawson saw Leyton Orient complete a 3-2 victory over Bristol Rovers to set up a trip to face Premier League Blackburn.
David Mooney and Ben Chorley, with a penalty, gave Orient a 2-0 lead but Chris Zebroski pulled a goal back before Eliot Richards levelled things up in injury time, only for Dawson to snatch an even later winner.
Michael Rankine and a Danny Livesey own goal helped Aldershot see off Carlisle to earn a home tie against Rochdale.