Having posted 168 for eight at Adelaide, buttressed by Glenn Maxwell's 54 not out off 32 balls, Australia needed to keep Afghanistan to a score of 106 or fewer to get ahead of England's net run-rate.
Even restricting their opponents to 117 or under would have meant net run-rate remained a big talking point but Afghanistan went past both scores after a wobble before Rashid Khan threatened a huge upset.
Some destructive lower-order hitting from Rashid brought the equation down to 11 off two balls although Marcus Stoinis held his nerve to seal what might still be a priceless four-run win for Australia.
However, the defending champions' bid to reach the semi-finals hinges on Sri Lanka overcoming England, who go into the clash knowing they can win by the slimmest possible margin to finish in the top-two.
For now Australia leapfrogged England into second place after moving level on seven points with New Zealand, who guaranteed their spot in the last four after beating Ireland earlier on in the day.
Australia were without captain Aaron Finch and middle-order 'finisher' Tim David because of hamstring injuries while left-arm quick Mitchell Starc was conspicuous by his absence for a crucial fixture.
His replacement, Kane Richardson, leaked 48 runs in four overs, with his last two balls dispatched for six by Rashid, who cleared the rope four times in total in his unbeaten 48 off 23 balls.
In this first competitive T20 meeting between the teams, Afghanistan had lurched from 99 for two to 103 for six in the space of nine deliveries before Rashid's clean power hitting took them close.
Ultimately Rashid slapped the penultimate delivery up in the air, with the ball landing safely, meaning even a last-ball four was in vain as Afghanistan guaranteed they will finish bottom of the group.
Knowing they needed victory by a hefty margin, Australia came firing out of the traps but were on 52 for three at the end of the powerplay after losing David Warner and Steve Smith in the sixth over.
Warner departed for 25 off 18 deliveries after being bowled through the gate attempting a switch hit off Naveen-ul-Haq, who had Smith lbw four balls later en route to superb figures of three for 21.
Mitch Marsh contributed some lusty blows in his 45 off 30 deliveries while Maxwell kept up the onslaught although Australia seemed to run out of steam as they added just 25 off the last four overs.