Inzaghi (r) and Shevchenko were the heroes for AC Milan
Filippo Inzaghi and Andriy Shevchenko struck twice in the last two minutes to send AC Milan into the Champions League semi-final at the expense of Lyon.
Gerard Houllier's side were in control until Inzaghi bundled home his second goal, and Shevchenko added a third to become the tournament's record scorer.
Inzaghi's 25th minute header had given Milan an early advantage.
But Mahamadou Diarra headed a crucial away goal that looked decisive until Milan's devastating late double blow.
It was cruel on Lyon, and particularly the impressive Diarra, who was being watched by Manchester United boss Sir Alex Ferguson.
Shevchenko's late goal put him in the record books, his 52nd strike making him the leading scorer in the competition.
Dida set the tone for a shaky defensive display when he mis-kicked Alessandro Nesta's back-pass, but Sylvain Wiltord was unable to take advantage.
And a mix-up between Dida and Kakha Kaladze in the 15th minute almost let Lyon in, but Florent Malouda lobbed the loose ball over the bar.
Lyon continued to dominate, and the busy Dida then had to punch away a 25-yard free-kick from Juninho.
Milan suffered a blow in the 23rd minute when Jaap Stam limped off with an ankle injury to be replaced by Alessandro Costacurta.
But Milan's spirits were lifted a minute later when they took the lead against the run of play.
Fred carelessly conceded possession to Shevchenko, who found Clarence Seedorf. The Dutch midfield man produced a perfect cross for Inzaghi to head past Gregory Coupet.
Lyon were deservedly level six minutes later as they once again exposed the vulerability in Milan's defence.
Juninho's whipped free-kick found Dida confronted by three unmarked Lyon players, and when the loose ball bounced into the air Diarra reacted first to head home.
Lyon were adopting a cavalier approach, and were only denied a second by the woodwork six minutes before the interval when Fred headed Juninho's corner on to the post.
Houllier's side continued to control affairs after the break, with Milan's much-vaunted attack unable to pierce a well-organised defence.
Both sides made substitutions with 20 minutes to go, Lyon replacing Fred with the giant figure of John Carew while Milan sent on Massimo Ambrosini for the disappointing Andrea Pirlo.
It almost brought instant results when Wiltord was forced to clear Kaka's effort off the line.
But with just three minutes remaining, Milan delivered a cruel blow that left Lyon heartbroken.
Shevchenko's shot bounced off both posts, but fell invitingly for Inzaghi to bundle home from virtually on the line.
And Shevchenko completed a stunning finale by rounding Lyon keeper Gregory Coupet to add the third after he intercepted Francois Clerc's back-pass.
AC Milan's Clarence Seedorf:
"It was tough because we were playing and playing and creating nothing.
"It was so hard because Lyon are so well-organised, but in the end you have to keep believing and I felt we deserved it.
"I don't think they created any open chances against us. We gave away a Champions League in the final against Liverpool last season, so maybe this year a bit of luck has come our way."
Lyon coach Gerard Houllier:
"I think Lyon were better than Milan and it would have been all right to a certain extent if we had lost to an unbelievable shot.
"Away from home we must take our chances and I think we lacked a bit of focus. We were three minutes away from the last four.
"I can't be too disappointed because we played well, maybe better than our opponent. It all happened in the last few minutes. We had the win in our pocket."
AC Milan: Dida, Stam (Costacurta 24), Nesta, Kaladze, Serginho, Pirlo (Ambrosini 71), Gattuso (Maldini 78), Seedorf, Kaka, Inzaghi, Shevchenko.
Subs Not Used: Kalac, Rui Costa, Gilardino, Vogel.
Booked: Gattuso, Inzaghi, Serginho, Maldini.
Goals: Inzaghi 25, 88, Shevchenko 90.
Lyon: Coupet, Clerc, Cris, Cacapa, Abidal, Juninho, Diarra, Malouda, Wiltord, Fred (Carew 71), Govou (Reveillere 83).
Subs Not Used: Vercoutre, Muller, Clement, Benzema, Pedretti.
Goals: Diarra 31.
Att: 80,000Ref: Terje Hauge (Norway)