The 23-year-old had also been a target for Arsenal, but will now move to Anfield subject to him passing a medical.
Sahin, who has won 31 caps for Turkey, becomes the third new arrival for new manager Brendan Rodgers following the permanent signings of striker Fabio Borini from Roma and midfielder Joe Allen from Swansea City.
Sahin came to global attention when he played a key part in Borussia Dortmund winning the 2010-11 Bundesliga title, and he was named Germany’s Player of the Year for his contribution.
That earned him a move to Real Madrid last summer, but he failed to make an impact at the Bernabeu and made just four appearances in La Liga last term.
Real Madrid head coach Jose Mourinho has expressed his desire to see Sahin get more playing time in another of Europe’s top leagues, but ultimately wants to keep the player in the long term.