The Reds offered to pay a larger proportion of the 23-year-old's £115,000 a week wages, swinging the deal in their favour.
Sahin, who has 31 caps for Turkey, will undergo a medical ahead of the match against Manchester City on Sunday.
Arsenal manager Arsene Wenger is now considering a number of other targets.
Sahin had been expected to join Arsenal,having privately expressed a preference for the north London club. But the deal stalled when Real and Arsenal could not agree a £14m option to buy the player at the end of the loan.
Liverpool and Real then agreed a deal, with Sahin's agent meeting Liverpool officials earlier in the week to agree terms.
Real boss Jose Mourinho had given the go ahead for Sahin to move to the Premier League after the playmaker struggled to make an impression at the Bernabeu since a move from Bundesliga champions Borussia Dortmund last summer.
Sahin signed a six-year deal with the La Liga outfit but made just 11 appearances for them last season as they won the Spanish league title.