Having finally bowled their hosts out for 572 on the fourth morning, Michael Clarke's men set about chasing down a 158-run deficit but were staring at an innings defeat as Ashwin steadily made his way through the batting line-up.
However, a half century from Moises Henriques and an unbeaten last-wicket stand of 57 with Nathan Lyon saw Australia past their target and left India needing to bat again to wrap up the win. At close of play on day four, the tourists were on 232 for nine, a lead of 40 runs, with Henriques not out on 75.
India resumed on 515 for eight and added 57 more in the morning before being bowled out for 572 - a daunting lead of 192.
In reply Australia looked like they might survive to the break unscathed until Ashwin struck with the final ball of the morning, finding the shoulder of Shane Watson's bat and seeing a simple catch swallowed by Virender Sehwag.
Things failed to improve in the afternoon for Australia with Ed Cowan making 32 before becoming Ashwin's second victim lbw.
David Warner came in at number three but within an over partner Phil Hughes was also out without scoring, deceived by a bouncer from Ravindra Jadeja which flew to Sehwag off the batsman's glove.
Warner managed 23 but was clearly feeling the effects of illness and became India's fourth wicket, trapped leg before by Harbhajan Singh, who struck again soon after, brushing Matthew Wade's off stump with a straight delivery to remove him for eight.
That left Michael Clarke to carry the burden but the captain had faced just three balls of the final session when, with his score on 31, Ashwin had the crowd cheering with a ball which spun sharply and rapped the pads.
Peter Siddle barely troubled the scorers after missing one from Jadeja which took his bails off and Ashwin then had Australia on the ropes with the dismissals of James Pattinson, Sehwag taking his third catch of a productive innings at first slip, and his fifth victim Mitchell Starc, who scooped a shot to Sachin Tendulkar at deep mid-on.