Matip will move on a free transfer when his current contract with the Bundesliga side expires this summer, and reports have suggested he is set to be on a four-year deal at Anfield.
In a statement on their official website on Monday afternoon, Schalke confirmed their efforts to convince the 24-year-old to stay had been in vain.
Chief executive Horst Heldt said: "We have since May last year had many intensive discussions, both with Joel and his advisor. It was soon clear that factors would be decisive for Joel's decision that we ultimately could not influence."
Schalke added in their statement: "Joel Matip has agreed to join Liverpool at the end of the season, and will not extend his contract at Schalke. The central defender will sign a new deal at the Premier League club."
The German-born player, who can operate as a midfielder as well as at centre-back and has 27 Cameroon caps, came through Schalke's youth set-up.
He made his Bundesliga debut at the age of 18, scoring in a 1-1 draw with Bayern Munich in November 2009, and has over 200 senior club appearances to his name.
He has been an ever-present for Schalke this season and leads Schalke's players in all defensive stat categories; interceptions, blocks, clearances and headed clearances. The 6 foot 4 stopper has been particularly effective defending aerial set-pieces, an area where Liverpool have suffered in recent seasons.
But his pace and mobility means he is able to cope in a high line, a requirement of a Klopp defender.
Matip said: "I have always said I would say goodbye to Schalke for only one reason: to get acquainted with something completely new.
"Therefore, a change within the Bundesliga never came into consideration for me.
"Although my decision is definitely not easy, I am convinced that now is the right time to take this step."
He added: "Schalke will remain a big family for me. I was always proud to play for this great club and I will do everything possible in the coming months to get the most out of this season. I owe the fans and the team."
Liverpool's interest in Matip has been known since January and the move will see him follow Serbian midfielder Marko Grujic - Jurgen Klopp's first signing as Reds manager - in joining the Merseyside outfit.
Grujic, recruited in early January for £5.1million on a four-year contract, immediately returned to former club Red Star Belgrade on loan for the remainder of the season and will rejoin Liverpool this summer.