Matip, 24, is set to arrive on a free transfer when his current deal with the Bundesliga side expires in the summer.
The German-born player, who can play at centre-back and in midfield, has 27 Cameroon caps and came through Schalke's youth set-up.
Matip, who made his league debut at 18 and has more than 200 club appearances, is the second signing by Jurgen Klopp, who took over as Reds boss in October.
Serbian midfielder Marko Grujic signed for the Reds in January for £5.1m on a four-year contract but immediately returned to former club Red Star Belgrade on loan for the remainder of this season.
Find all the latest football transfers on our dedicated page.
LISTEN: Did brain power save Matip's career? Schalke's academy coach speaks to BBC World Service
Schalke defender Joel Matip will join Liverpool at the end of the season.