A masterclass in shooting from Diarmuid Murtagh in Newtowncashel helped Longford reach this year's final.
Despite building up a three-point advantage in this highly charged encounter, the midlanders allowed Dublin back into the contest.
The Dubs got off the mark in the 12th minute thanks to an excellent free-kick from captain Adam Rogers, who finished with six points. The full-forward pushed them into a one-point lead with five minutes to the break – and on the brink of half-time Dublin snatched the game's first goal through Lee O Briain.
In the second half Dublin scored a second three-pointer from Conor Gallagher in the 52nd minute to put five points between the sides. Longford responded, however, and star player and Murtagh single-handedly turned things round.
Roscommon minor Murtagh instigated their impressive fightback when he rattled the top corner of the Dublin net with eight minutes remaining and three unanswered points in the closing minutes sealed the win.
scorers – Longford: D Murtagh 1-7 (2f), S Kenny 0-2 (1f), N Rabbitt, R Connor 0-1 each.
Dublin: A Rogers 0-6 (4f), L O Briain 1-0, C Gallagher 1-0, D McLaughlin 0-1.
Longford – G Kenny; J Rooney, A Farrell, I Illunga; S Cosgrove, S McKeogh, P Farrell; A McElligot, D McGivney; N Rabbitt , S Kenny, M Gorman; R Brady, R Connor, D Murtagh. Subs: E Sorohan for M Gorman (28), L Sullivan for Sorohan (41), F Farrell for McKeogh (41), D Fitzsimons for Illunga (53).
Dublin – K McGovern; S O'Malley, I Baile, K Tracey; D Kiernan, S Gleeson, B O'Raghallaigh; D Casey, C Gallagher; K McAnerin, L O Briain, S Rocks; E Smith, A Rogers, D McLaughlin. Subs: J Andrews for Rocks (h-t), C O Gruagain for Casey (41), B O'Malley for O'Raghallaigh (42).
Ref – C Douneen (Cavan).