Galway's quick forwards ripped Donegal apart in the first half with two Johnny Heaney goals and a Liam Silke penalty.
The Connacht side led 3-10 to 0-7 at the break and Donegal went down to 13 men when two players were black-carded with all five subs having been used.
Galway lost Declan Kyne to a red card before Danny Cummins blasted in their fourth goal in added time.
It was a nightmare Round 4A qualifier for the Ulster team at Markievicz Park, although Donegal led 0-5 to 0-4 before Galway seized control.
A series a fisted passes ended with Heaney hitting the roof of the net before Galway were awarded a penalty.
Michael Murphy's mistake let Galway in and keeper Mark Anthony McGinley tripped Tom Flynn - McGinley was black-carded and his replacement Peter Boyle was unable to keep out Silke's penalty.
Midfielder Heaney palmed in the third just before the break and a shell-shocked Donegal side went in 12 points behind at the interval.
Any chance of the Donegal comeback ended with the black cards for captain Murphy and Martin McElhinney early in the second half.
With just 13 players it was matter of damage limitation although Galway were reduced to 14 when Kyne was dismissed for two yellow cards.
Donegal squandered a penalty chance, awarded when Cathal Sweeney was black-carded for a foul on Martin O'Reilly.
Bernard Power kept out Patrick McBrearty's low strike and the keeper also saved the forward's follow-up effort.
Cummins had the final say for an impressive Galway, who progress to an All-Ireland quarter-final against Kerry.
Mayo edged out Cork 0-27 to 2-20 after extra-time in the other qualifier and they will take on Roscommon in the quarter-finals.
Donegal's hopes of All-Ireland success ended with a hammering by Galway in Saturday night's qualifier in Sligo.