Thiago, 29, joined the German giants from Barcelona in 2013 and played in last season’s Champions League final victory over Paris St-Germain.
He is set to wear the number six shirt at Anfield.
Thiago would be the Premier League champions’ second summer signing, after
Greece left-back Kostas Tsimikas.
The £20m will be paid over the length of Thiago’s contract and the extra £5m will depend on the Reds winning the Premier League and Champions League success.
When asked about a potential move for the Spaniard last week, Liverpool manager Jurgen Klopp said: “I cannot end speculation as long as the transfer window is open.
“It is nice that we are linked with him but that is pretty much it really. It is because he is a good player and Liverpool is a big club, so that is nice.”
Thiago started his career at Barcelona and was heavily linked with a move to Manchester United when David Moyes replaced Sir Alex Ferguson in 2013, but the move did not transpire and he went to Germany instead.
As well as the Champions League, he has won seven consecutive Bundesliga titles, four German Cups and the Club World Cup with Bayern.