First-half goals from Sekou Mara and Moussa Djenepo secured a stunning 2-0 win for Nathan Jones' under-pressure Saints, who will host the high-flying Magpies in the first leg.
Newcastle reached their first League Cup semi-final for 47 years with a 2-0 win against Leicester on Tuesday night, when boyhood fan Dan Burn scored his first goal for the club.
Four-time League Cup winners Nottingham Forest were drawn at home to Manchester United following their 4-3 win on penalties against Wolves after the game finished 1-1 in normal time.
Dean Henderson saved two spot-kicks in the shoot-out to set up a clash with United after Erik ten Hag's side beat Sky Bet League One outfit Charlton 3-0 on Tuesday.
But on-loan Henderson will not be able to take part in the semi-finals against his parent club United.
The semi-final ties will take place in the weeks commencing January 23 and 30.