Australia bowled out India inside the final hour of the fifth day in Melbourne to take a 2-1 lead in the series.
The tourists, set 340 to win, looked on course to secure the draw when they reached tea with only three wickets down.
But Rashibh Pant holed out to Mitchell Marsh on the boundary off Travis Head, the first of seven wickets to fall for 34 runs as they collapsed to 155 all out.
Pant (30) and opener Yashasvi Jaiswal, who was clearly unhappy when the third umpire adjudged he had gloved Pat Cummins to wicketkeeper Alex Carey for 84, provided the main resistance.
But no other Indian batsman reached double figures as they subsided to a 184-run defeat.
LYON DOES IT!
— cricket.com.au (@cricketcomau) December 30, 2024
What a remarkable win for Australia! #AUSvIND pic.twitter.com/SGbA3R797X
Scott Boland struck twice before Nathan Lyon wrapped up the innings when he trapped Mohammed Siraj’s leg before the last three wickets fell for five runs in three overs.
Lyon had been bowled by Jasprit Bumrah, who finished with five for 57, for 41 as Australia were dismissed for 234 at the start of the day.
The final match of the series for the Border-Gavaskar Trophy in Sydney starts on Friday.