The former Huddersfield Town boss will replace interim manager Huub Stevens once Schalke's season concludes.
Wagner has been out of a job since January when he left Huddersfield midway through the team's second-ever season in the Premier League. Huddersfield were relegated just over two months after his departure.
Schalke sacked Domenico Tedesco in March following their embarrassing 7-0 Champions League loss to Manchester City.
Wagner will be relied upon to right the ship for a Schalke side that flirted with the possibility of relegation for much of the season. Uncertainty over their future in Germany's top flight lasted late into the campaign until they separated themselves from the drop zone with a decisive victory over rivals Borussia Dortmund on April 27.
Mathematically safe from relegation, Schalke currently sit 15th in the Bundesliga table with two matches remaining.