Glenn Maxwell (59 off 41) played himself back into form with the bat and threatened to reprise his role as Afghanistan’s bogeyman, following a double-century at the ODI World Cup last year.
But Afghanistan could smell victory when the allrounder clipped player-of-the-match Gulbadin Naib (4-20) to backward point, where Noor Ahmad took a tough chance in the 15th over.
Australia were all out for 127 in the final over, left to rue some sloppy fielding and a sluggish start with the bat.
The loss means Australia may rely on net run-rate to make the final four even if they are able to beat India in their last Super Eight game on Tuesday.
Afghanistan’s historic victory keeps their own hopes of a fairy-tale semifinal berth alive ahead of their third Super Eight match against Bangladesh.
After winning the toss, Australia dropped five chances in the field, the first two coming during the blistering opening stand.
As Gurbaz and Zadran wreaked havoc, Matthew Wade missed an easy opportunity for a stumping and Australia twice leaked fours following misfields from Ashton Agar - called in for Mitch Starc.
After dropping an earlier chance, Marcus Stoinis (1-19) had a long-overdue breakthrough when Gurbaz picked out David Warner at deep backward square leg.
When that scalp eventually came - in the 16th over - it was the longest Australia had gone in a T20I without taking a wicket.
Australia’s best two front-line bowlers this tournament, Adam Zampa (2-28) and Cummins, ensured Afghanistan’s batting order never clicked back into gear once the opening partnership was broken.
Cummins became the first player to take hat-tricks in consecutive T20 games when Gulbadin (0) pulled him to Maxwell at deep midwicket in the final over. He could’ve had another scalp off the next ball had the usually reliable Warner held onto Nangeyalia Kharote at deep point.
Naveen-ul-Haq (3-20) vindicated the decision to start Afghanistan’s innings with pace, swinging the ball into Travis Head’s middle stump on the third ball of the night.
The losses of Head (0) and Mitch Marsh (12) inside three overs raised the alarm, and Australia were officially in panic mode when Afghanistan injected spin for the first time.
Warner (3) skied Mohammad Nabi to short fine leg on the off-spinner’s first delivery and set the stage for Maxwell to haunt Afghanistan again. But when the allrounder’s gutsy knock came to an end, Australia were into the bowlers and limping to the finish at 106-6.
With Australia requiring 24 runs from the final over, Azmatullah Omarzai sealed a famous victory when Zampa hit him to Nabi at long-on with four balls left.