Eoin Bradley's injury-time free secured a first Ulster SFC victory for Derry since 2011 after a dramatic finish against 14-man Down in Celtic Park.
Derry looked to be cruising to victory, leading 0-10 to 0-6 early in the second half after Conall McGovern's straight red card just after the restart.
However, Down rallied superbly and hit four points in a row, including three Paul Devlin frees, to draw level.
Bradley slipped over a close-range free to give Derry a place in the semis.
After a quiet opening, Fergal Doherty and Mark Lynch came to the fore at the end of the opening half and combined to steer Derry into a 0-8 to 0-5 lead at the break.
The sides were level twice in the opening nine minutes, Bradley and Kevin McKernan both scoring and starring for their respective sides.
Bradley scored three points early on as Derry opened up a 0-4 to 0-2 lead after 19 minutes.
Derry's excellent fullback line bottled up the Down forwards, who were guilty of rushing their shots.
Lynch had a bad start with three wides before he converted his first free in the 24th minute. The score lifted him, and he hit three subsequent points from play before the break.
Paul Devlin nailed two first-half frees for Down and McKernan was the key performer, collecting a pass from Conor Maginn who split the posts after 32 minutes to leave the visitors trailing by 0-6 to 0-5.
After a subdued start, Fergal Doherty caught two kickouts in the closing moments to inspire Derry, and on both occasions, Lynch got the end of the move to score a valuable brace.
Derry led by 0-8 to 0-5 at half-time and things got even better for them when McGovern received a straight red card for an alleged strike on Enda Lynn after the throw-in.
Initially, Derry profited with the extra man.
However, from nowhere, 14-man Down suddenly wrestled the initiative away from Derry and reeled off four points in a row in an eight-minute spell to draw level.
Paul Devlin converted three frees before Conor Laverty, who had fisted the opening point of the second half, scored a screamer from the wing to tie the scores after 56 minutes.
Laverty pulled the strings and orchestrated for Down but they were left to regret seven second-half wides when Caolan O'Boyle nudged Derry, who had failed to score for 21 minutes, ahead with nine minutes remaining.
Devlin scored his sixth free of the afternoon to tie the scores again after 67 minutes.
The game looked certain to end in a draw in an absorbing last ten minutes but when Derry mounted one last attack, Bradley released Kevin Johnston, who was dragged down by Darren O'Hagan.
The Down defender picked up a black card and Bradley put a relieved Derry through to an Ulster semi-final against Armagh or Donegal in 27 June.
Bradley's last gasp winner gave Derry only their second championship win in Celtic Park under Brian McIver.
Derry: T Mallon; O Duffy, B Rogers, D McBride; K Johnston, C McKaigue, C McFaul; N Holly, F Doherty; SL McGoldrick, M Lynch (0-5, 2f), E Lynn (0-1); B Heron, E Bradley (0-5, 3f), D Heavron.
Subs: C O'Boyle (0-1) for Heron (53), T O'Brien for Lynn (63)
Down: S Kane; D O'Hagan, L Howard, R Boyle; D Turley, B McArdle, C McGovern; P Fitzpatrick, C Mooney; P Devlin (0-6, 6f), C Maginn, K McKernan (0-2); M Poland, C Laverty (0-2), D O'Hare (0-1, f).
Subs: P Downey for Maginn (48), J Johnston for Fitzpatrick (60), A McConville for Mooney (66), N Madine for Devlin (69), D O'Hanlon for O'Hagan (BC, 70)
Referee: Eddie Kinsella (Laois)