Lovren, 31, has signed a three-year contract with the Russian champions.
“Another Liverpool legend who leaves the club, because he was absolutely a very, very important part of this team from the first day since I was in,” Liverpool boss Jurgen Klopp told the club’s website.
“I remember when we played with Dortmund against Liverpool in the pre-season friendly and Dejan scored with a header with incredible power. That was the image I had in my mind when I came here and I thought about the defenders we had at the time.
“He played super games and scored one of the most important goals of our history in the 4-3 against Borussia Dortmund; a really wonderful moment to share.
“He is a model athlete, has everything you need and now he goes to Russia, but he can come back always – he will be always welcome because he is a really nice guy.”
Lovren joined Liverpool from Southampton in 2014 and despite a number of inconsistent performances, he helped the club win the Champions League last year and claim their first league title in 30 years this season.
The defender also won the UEFA Super Cup and the Club World Cup during his tenure at Anfield where he made 185 appearances and scored eight goals.
“We’re really going to miss you a lot, especially me. You’ve been an unbelievable player and a great friend for me. We’re going to miss you a lot. I miss you a lot, I love you so much.
“You’ve been fantastic outside the field and inside the field. So, thank you for everything you did for the club, thank you for everything you did for me.
“I wish you all the best in the future and I wish you to have a great career as well, enjoying the new club with your family. Thank you very much and see you soon.”