Cavan's heroic comeback fell just short as Cork held on to book their place in the All-Ireland U21 football final with a 0-15 to 1-11 win.
A missed free deep into stoppage time denied the Breffni lads a draw and extra-time, after they had come back from six points behind with the help of a Chris Conroy goal.
Cavan made a promising start, going ahead with scores from Paul O'Connor and Enda Reilly, but the Munster men got on top at midfield, and by the 12th minute there were two ahead, with Dan MacEoin, Brian O'Driscoll, Damien Cahalane and Luke Connolly firing over points.
Connolly and Alan Cadogan were on target as the Rebels went 0-6 to 0-3 ahead, but Cavan responded with superb points from Turloc Mooney and Reilly.
It was the Munster champions who took a 0-7 to 0-5 lead into the interval, and they went clear in the early stages of the second half, with two Brian Hurley points and scores from Mark Sugrue and MacEoin.
But Cavan were right back in it in the 53rd minute when Conroy fired in the only goal of the game.
Moynagh brought the sides level, and in a heart-stopping finish, both sides were awarded frees. McEoin nailed his, but a much more difficult effort curled wide off the boot of Reilly, who had been brought back.