In one of the most surprising results in Champions League history, Ralf Rangnick's men fell behind in the opening minute to a Dejan Stankovic special before replying through Joel Matip. They then went behind again just after the half-hour mark when Diego Milito struck but somehow turned the tables and put themselves in a great position to progress to the semi-finals.
From the 40-minute mark, it was all the visitors, who scored the next four goals of the match - two coming from Edu, an own goal from Andrea Ranocchia and a customary strike from Champions League specialist Raul Gonzalez.
It was a replay of the 1997 UEFA Cup final which saw Schalke winning 4-1 on penalties after full-time finished 1-0 at this venue after the first leg had the same scoreline in Gelsenkirchen.
The Germans managed to inflict a rare quarter-finals defeat on last year's champions who will certainly have their work cut out for them in the return leg at Veltins-Arena next Wednesday.
Venue: San Siro, Milan Crowd: 75,000 Referee: Martin Atkinson (ENG) Yellow cards:INT - Dejan Stankovic 13', Cristian Chivu 53'/62' SCH - Jefferson Farfan 45', Hans Sarpei 60', Kyriakos Papadopoulos 67', Raul Gonzalez 85' Red card:INT - Cristian Chivu 62'
GOAL It was amazing scenes inside the opening minute when Esteban Cambiasso's cross from inside the Inter half was headed out by advancing Schalke keeper Manuel Neuer only for Dejan Stankovic to volley home in superb fashion from 40 yards t make it 1-0.
Schalke almost hit back immediately when Raul's fourth minute header went inches wide and they did manage to find their feet following the opening goal.
GOAL Then in the 17th minute, the visitors were back in the contest as Inter failed to deal with Kyriakos Papadopoulos' header from a corner which was kept out by Julio Cesar only for Joel Matip to put it into the back of the net to make it 1-1 in what was a scintillating beginning in Milan.
Seven minutes after the second goal, Stankovic had to be substituted off the pitch with an injury with Houssine Kharja replacing him as the pace of play began to die down slightly.
GOAL But that changed in the 34th minute when the home side restored their lead when Wesley Sneijder played a lovely ball into the right side of the penalty box for Cambiasso who headed into the path of Diego Milito who finished with a neat side-footed volley past a hapless Neuer.
GOAL Six minutes later, Schalke were again on lever terms when Brazilian forward Edu shot on goal only to see the deflected attempt kept out by a diving Julio Cesar before the Schalke man followed up with a sublime finish with the outside of his left boot from a tight angle to add another twist to the tale.
Inter should have had their third immediately as the second half commenced when Sneijder slipped a through ball to Milito who took a heavy first touch before sliding his shot wide under pressure from Neuer who had come right off his line.
Less than two minutes later, Neue came up with a vital save when Samuel Eto'o weaved his way into a shooting position in the area but could not beat the German with his left-footed shot from close range.
GOAL Seemingly against the run of play, Schalke again came at the hosts and managed to edge their way in front when Jefferson Farfan put a little ball into the path of Raul who beat off competition from his marker, before using his experience and predatory instincts to prod past Julio Cesar to make it 3-2 in the 53rd minute for his 70th goal in this competition.
GOAL Less than four minutes later, Inter went two behind when Jose Manuel Jurado made a run down the right flank before sending a low cross into the area which was inexplicably slid into the back of the net by Nerazzurri defender Andrea Ranocchia, silencing the San Siro crowd.
Things got worse for Leonardo's men when Cristian Chivu was sent off in controversial fashion for a questionable second yellow card for his 62nd minute challenge on Edu before Atsuto Uchida struck the post with his attempt as Inter firmly had their backs pressed against the wall.
Schalke were inches away from a fifth goal with around 15 minutes remaining when Farfan skipped around the Inter defence before seeing his first shot saved by Julio Cesar and then following up with a shot that bounced of Ranocchia and onto the post.
GOAL From that piece of play, the Germans did score a fifth when Edu received a pass on the edge of the area, turned and stuck a sweet left-footer past his fellow Brazilian to make it 5-2 in one of the most fascinating Champions League games in history.
Inter Julio Cesar (gk) - Douglas Maicon, Andrea Ranocchia, Cristian Chivu, Javier Zanetti - Dejan Stankovic (Kharja 24', Cordoba 63'), Thiago Motta (Nagatomo 76'), Wesley Sneijder, Esteban Cambiasso - Samuel Eto'o, Diego Milito
Subs - Luca Castellazzi (gk), Houssine Kharja (24'), Ivan Cordoba (63'), Yuto Nagatomo (76'), McDonald Mariga, Marco Materazzi, Goran Pandev,
Schalke Manuel Neuer (gk) - Atsuto Uchida, Joel Matip, Benedikt Howedes, Hans Sarpei - Jefferson Farfan, Kyriakos Papadopoulos, Jose Manuel Jurado (Draxler 83'), Alexander Baumjohann (Schmitz 76') - Raul Gonzalez (Karimi 87'), Edu
Subs - Mathias Schober (gk), Lukas Schmitz (76'), Julian Draxler (83'), Ali Karimi (87'), Sergio Escudero, Nicolas Plestan, Junmin Hao