The 23-year-old Turkey international becomes new Reds boss Brendan Rodgers' fourth new arrival following Joe Allen, Fabio Borini and Oussama Assaidi.
The Merseysiders saw off competition from Arsenal for Sahin, who helped Madrid win the Primera Division title last season, and the player said former Liverpool midfielder Alonso's passion for the club convinced him it was the right move.
Asked whether he spoke with Alonso before making his mind up, he said on www.liverpoolfc.tv: "Yes, of course. A lot of times. Xabi is a person who really cares about football. He's in love with football. I'm the same, and that's why we had a lot of conversations. When I arrived at Real Madrid, we spoke about German football and Italian football. He likes football! When he heard Liverpool were interested in me, he started telling me about Liverpool.
"He is still in love with Liverpool Football Club, I think. It's crazy how he was telling me about Liverpool. He was saying, 'Go there - you will love it. The fans will take care of you and love you' and things like that. He said Anfield is the best stadium in the world. Xabi won a lot of trophies here, and hopefully we can do that too."
Madrid coach Jose Mourinho also advised Sahin that the Premier League would be good for his development.
"We spoke and he told me that English football, especially the Premier League, is the best to enjoy as a footballer," the former Borussia Dortmund man said. "Every weekend you can enjoy football. He also told me about how he and Brendan Rodgers worked together at Chelsea and that he's a good coach and person. That's important for me. It's not only football, it was very important for me to have someone who I can speak with."
Sahin becomes the first Turkish player to sign for the Reds, and he cannot wait to get to work for his new club under the guidance of former Swansea boss Rodgers.
"We've had a lot of conversations," he said on www.liverpoolfc.tv. "We spoke and he told me about his ideas for how he wants to play football and where he sees me on the field in the team. I was impressed at how he loves football."
He added: "Of course it makes me proud to play for such a big club like Liverpool Football Club as the first Turkish player. Now it is up to me to make the people in Turkey proud. It feels great. I am happy to be here and I am looking forward to playing for Liverpool."
Sahin joined Madrid last summer after catching the eye during a successful spell with Dortmund, with whom he won the Bundesliga title in 2010/11.
"I had a difficult season last year because of a lot of injuries," said the player, who has also won 31 caps with Turkey, scoring his first national goal aged just 17 against Germany in 2005.
"I had three injuries last year. The team played very well, but I didn't play too many games, so that's why I spoke to Real Madrid and told them I wanted to go out for a year.
"I want to play football - and it was important for me to be at a club where the manager really wants me. I wanted to play for a club on the same level as Dortmund and Madrid - that's why I chose Liverpool. This year, it is very important for me to play. I have to play, improve my game and help the team. If I stay in good condition, I am sure I can help the team and Liverpool Football Club, and Brendan Rodgers and my new team-mates can help me."