Long joins Southampton just seven months after joining Hull in a £6.5million deal from West Bromwich Albion.
Saints manager Ronald Koeman said: “Shane is a very good player. As a striker, he’s different to Graziano Pellè, which is something we needed.
“He brings ambition and a great mentality – he’s always running and always working, and he’s very down-to-earth. He’s a great person, and we need that type of player.
“He brings a lot of experience to our squad because he’s already played at Premier League level for a few years. He knows what we need at this level, and he can show that to our younger players as well.
“Shane will be an important player for us and our future.”
Long said: “I’m delighted. This came out of the blue for me but, once I’d come and had a look at the training facilities and met the manager, it seemed like the right decision for me and my family.
“It was a hard decision for me to make, but when you come down to Southampton you see how big a club it is and how well set up it is.
“You look at how well they did last season and they are developing a new squad for this year to try and achieve those accomplishments again, and hopefully I can be a big part of that.
“Southampton play a brand of football that’s enjoyable to watch, and I’m sure it will be enjoyable to play in as well. I think the formation they play will suit me, and the manager has a lot of knowledge about football and I’m looking to learn off him.
“In theory it’s a very good move for me, but all the hard work starts tomorrow when I get on the training pitch because I have to prove my worth.”
Hull boss Steve Bruce said he was not looking to offload the Republic of Ireland striker, who scored four times in 17 appearances, but said Southampton's offer was too good to turn down.
Bruce said: “Myself and the owners didn’t want to lose Shane but we accept it’s a very good offer, especially when you consider what we paid in January."
Hull wished the 27-year-old good luck by posting a message on their website saying: "We would like to place on record our thanks to Shane for his service and wish him well for the future."