Cork hit three late goals to defeat the Candystripes in the FAI Cup quarter-final replay at Turner's Cross.
The hosts dominated the first half but Derry held firm and they almost made a second-half breakthrough when Philip Lowry was denied by the woodwork.
Ross Gaynor volleyed into the roof of the net 15 minutes from time and Garry Buckley headed in to make it 2-0.
John O'Flynn lobbed Gerard Doherty to seal victory and leave Derry to focus on their battle against relegation.
Cork were firm favourites to progress to a semi-final against Bray Wanderers after holding Derry to a 1-1 draw at the Brandywell on Friday night.
Doherty saved efforts from Mark O'Sullivan and Gaynor as the Leesiders seized control before Michael McSweeney ended a powerful run by lifting the ball over the bar.
O'Sullivan headed over seconds before the end of a first half in which Derry failed to trouble Cork keeper Mark McNulty.
Cork upped the tempo on the restart but failed to make their pressure count and Derry finally posed a threat after the introduction of Stephen Dooley and Mark Timlin.
Lowry fired against the base of a post and from the follow-up Timlin saw his shot saved by McNulty.
Cork were rattled but they were soon in front thanks to a superb strike from Gaynor, finishing a move started by former Celtic and Manchester United midfielder Liam Miller.
An unmarked Buckley headed home from a corner two minutes later and substitute O'Flynn added the third with four minutes remaining.
Disappointment for Derry but staying in the Premier Division is the priority and third-placed Shamrock Rovers are their opponents at the Brandywell on Friday night.