This is only the third time Schalke have reached the Champions League's last eight and it was all the more remarkable given their lowly 10th position in the Bundesliga as they sealed a 4-2 win on aggregate.
After drawing the first-leg 1-1 in Valencia a fortnight ago, goals either side of half-time by winger Jefferson Farfán and striker Mario Gavranovic sealed the home win.
The hosts fought back after Valencia took an early lead through Ricardo Costa.
"It was hard to apply pressure from the start, but after going 1-0 down we had nothing to lose," said Magath. "We just had to go for it."
There was a difficult build-up as the hosts woke to reports in the German media that Magath will leave the club at the end of the season at the latest.
"The background to this game is of no interest to us, the truth was out there on the pitch," said Magath in reference to the headlines. "It's not interesting for me what the papers say. I have a contract until 2013."
Magath, who has won the Bundesliga as coach of both Bayern Munich and VfL Wolfsburg, has steered his team to this season's German Cup final in May and now the last eight of the Champions League.
But the Royal Blues have had a disappointing Bundesliga campaign and are currently 31 points adrift of leaders Borussia Dortmund.
The Schalke faithful have begun to despair of the authoritarian Magath, but there were only smiles at Schalke's Veltins Arena after the win over the Spaniards.
Valencia took the lead when former Wolfsburg defender Costa scored with a nearly header on 17 minutes.
But Schalke drew level when Peruvian winger Farfán curled his free-kick into the top right-hand corner on 40 minutes.
The Royal Blues then took a 3-2 lead on aggregate when Swiss striker Mario Gavranovic - deputising for the injured Klaas-Jan Huntelaar - marked his Champions League debut with his first goal for the club on 52 minutes.
Gavranovic squandered a golden chance to put the result beyond doubt when he fired wide in the 80th minute with the goal at his mercy.
But Farfán put the result beyond doubt as he netted in the 94th minute after Schalke had dominated the closing stages of the game.
Schalke's Germany goalkeeper Manuel Neuer was again outstanding and kept his team in the game with a string of saves.