The 23-year-old left-back will now join up with Dean Smith's squad ahead of their return to the Premier League.
His transfer fee could rise to a potential £17m with add ons.
Smith was pleased to capture the England under-21 international, who made 21 appearances for Saints last season.
Targett spent 15 years at Southampton, where he was a product of their thriving academy.
Smith said: "We're very pleased to have Matt join us.
"He's a player we have been looking at for a considerable amount of time.
"He fits our criteria of being a young player with experience of playing in the Premier League and having the potential to develop further.
"He will help make us a stronger defensive unit and we are all looking forward to working with him."
Targett said: "Dean is building something special here.
"The club has a massive fanbase and I'm looking forward to playing in front of them."
Southampton, meanwhile, have bought Birmingham City striker Che Adams for £15m.