The 25-year-old becomes Brendan Rodgers’ fifth signing of the summer and the third from Southampton, following striker Rickie Lambert and midfielder Adam Lallana.
The deal is reported to be worth an estimated £20 million ($33.9m).
A Liverpool statement read: “Liverpool Football Club are delighted to announce the signing of defender Dejan Lovren from Southampton.
“The 25-year-old Croatian international today put pen to paper on a long-term deal with the Reds after completing his medical.”
Lovren told the club’s website: “It’s a dream come true.
“I’m happy and glad to be here. I’m proud and can’t wait to start. I know we have millions and millions of supporters – Liverpool is more than a club.
“After I played at Anfield last season, I said to myself: ‘One day I hope I’ll be able to play here for Liverpool’. The fans will know from the first minute that I’m a player that will give 100 per cent on the pitch.”
Lovren, who joined Southampton from Lyon for £8.5m last summer, leaves St Mary’s 12 months into a four-year contract.