The fourth round fixture comes after the Glovers beat Leyton Orient 4-0 at Huish Park in the third round.
Manager Gary Johnson said: "It is a absolutely fantastic draw for our club. Southampton are a great club and probably the biggest in our region. I don't think we could wish for a better draw. It will be a great game and one that our players and fans will look forward to."
The tie will take place over the weekend of 25th/26th January with a kick off time to be confirmed.