Donegal scraped through to the All-Ireland semi-finals but they were pushed all the way by Armagh.
Armagh were ahead going into the final five minutes after Stefan Campbell's goal but Donegal hit back and Paddy McBrearty kicked over a late winner.
Odhran MacNiallais netted for Donegal to help the Ulster champions to a 0-6 to 1-5 lead at the break.
Armagh moved in front with Campbell's goal but McBrearty clinched a 1-12 to 1-11 victory for Jim McGuinness's men.
Donegal are trying to lift the Sam Maguire trophy for a third time, having been crowned All-Ireland champions in 1992 and 2012. Earlier this year they secured their seven Ulster senior title.
In the semi-finals, they will face holders Dublin who hammered Monaghan 2-22 to 0-11.
Their captain Michael Murphy converted an early free in Saturday's Croke Park clash, but Donegal then went 20 minutes without landing a score, as plucky Armagh took the game to the Ulster champions.
Donegal dropped as many as 14 players back into their own half, but Tony Kernan by-passed the blanket with a long-range opener.
His brother Aaron nudged the Orchard men ahead from a free, and with Charlie Vernon and Finian Moriarty excelling at the back, Donegal struggled to create scoring chances on the breakaway.
They had gone two points behind to Aidan Forker's well taken effort by the time Jim McGuinness decided to release skipper Michael Murphy from his midfield role to take up his favoured full forward post.
Scuffles broke out during a tense opening 15 minutes, but once order was restored, Donegal began to play a more direct game.
The struck a major blow in the 23rd minute when Ryan McHugh sent MacNiallais in for a clinical angled finish to the net.
Armagh immediately regained the lead through corner back Andy Mallon, but the men from Tir Chonail struck four points in the final 10 minutes of the half to take a half-time advantage.
Worryingly for them, however, their attack failed to muster a single score from play, with full-back Neil Gallagher hitting Donegal's sole point from open action, and Murphy having converted three frees.
Andy Mallon exploited the opportunities afforded by Donegal's defensive approach to get forward at every opportunity, winning the free that Tony Kernan converted.
But with Neil Gallagher emerging as a major figure around midfield, the 2012 Sam Maguire Cup winners began to make moves, and went three clear when McFadden knocked over a couple of frees and Paddy McBrearty swung one over off his left boot.
Armagh were now struggling to deliver quality ball to isolated front men, and while Aaron Kernan did arrow over a fine score, their opponents kept daylight between the sides with a 49 metre free, stroked over delightfully by Murphy.
The pressure was building all the while on an Armagh side now feeling the pain, but as the game moved towards its final ten minutes, they were still just two points behind, thanks in no small way to Donegal's poor finishing.
And Armagh sensationally went back in front in the 60th minute when Brian Mallon crossed for Campbell to grab a goal, his fisted effort finally going in off goalkeeper Paul Durcan's leg.
But Murphy rallied the troops with a superb equaliser in the 68th minute, and it was McBrearty who clinched it for Jim McGuinness' side.
Armagh: P McEvoy, F Moriarty, C Vernon, A Mallon (0-1), M Shields, B Donaghy, A Kernan (0-2, 1f), S Harold, A Findon, A Forker (0-1), K Dyas, T Kernan (0-4, 1f), K Carragher (0-1), S Campbell (1-1), J Clarke.
Subs: B Mallon for Carragher, E Rafferty for Findon, R Grugan for Dyas, M Murray (0-1) for Forker, K Toner for Harold.
Donegal: P Durcan, E McGee, N McGee (0-1), F McGlynn, A Thompson, K Lacey, P McGrath, N Gallagher, C Toye, R McHugh, L McLoone, O MacNiallais (1-1), P McBrearty (0-2), M Murphy (0-5, 4f), C McFadden (0-3, 2f).
Subs: R Kavanagh for Toye, M McElhinney for McLoone, D O'Connor for McFadden, M O'Reilly for McBrearty.
Referee: J McQuillan (Cavan)