The Spanish Aprilia rider posted a quickest lap of one minute 29.225 seconds in second free practice on a dry track ahead of Sunday’s race.
Espargaro’s time, set on the fifth lap of his afternoon session, prevailed by just 0.005secs over Marquez, who almost bettered the time on his penultimate lap.
Marquez, who leads the world championship by 11 points with three races left, clocked 1:29.230 following his chart-topping 1:29.602 in the morning session.
Championship challenger Andrea Dovizioso was third quickest overall, finishing just 0.097secs behind Espargaro.
Ducati’s Dovizioso downed Marquez on the final lap to win last weekend’s rain-soaked Japanese GP and is second in the world championship.
Briton Cal Crutchlow, the winner of last year’s Australian race, was fourth fastest on a Honda, only 0.104secs down on the leader’s time.
Spain’s Maverick Vinales was fifth fastest despite coming off his Yamaha early in afternoon practice.
Australian Jack Miller, in his first MotoGP event back since breaking a leg during training, was sixth ahead of Suzuki’s Andrea Iannone.
Six-time premier class Phillip Island winner, Valentino Rossi, trailed in 12th place overall on his Yamaha, some 0.752secs behind Espargaro’s time.
The weather on the opening day was sunny, but the forecast for Saturday is for cooler temperatures and possible showers.