Miller, riding a Red Bull KTM, held off championship leader Marquez in the home straight by just 0.029 seconds for his fifth GP victory of the season.
The 19-year-old’s win reduced Marquez’s championship lead to 20 points with 50 points on offer in the remaining races at Sepang and Valencia.
Miller, who will race in the premier MotoGP class next season for the Honda-LCR team, won his first Australian race.
Marquez, watched by his elder brother and twice MotoGP world champion Marc, beat home his Estrella Galicia teammate Alex Rins in the 23-lap Australian GP. (AFP)