The Repsol Honda rider clocked a time of one minute 45.267 seconds to see off the challenge of Jorge Lorenzo (Yamaha Factory Racing) and set a MotoGP record with his 10th pole of the season.
Much of the session was a three-way battle between Stoner, Dani Pedrosa (Honda) and Lorenzo.
But in the end Andrea Dovizioso (Honda), who was on pole last year, snuck in ahead of Pedrosa to claim third.
Stoner said: "Everything has gone very well so far this weekend. We've been fastest in all but one session so it's been fantastic.
"Jorge has been riding fantastic, as has Dovi and Dani, but there is no doubt that the Honda suits this track.
"I've been looking forward to riding it here for a while now and I'm not disappointed.
"Tomorrow will be a tough race, but the team is working hard and we'll do our best."
Pedrosa was disappointed to be knocked down to fourth after having led earlier in the session.
He said: "At the end, when I switched to soft tyres, I couldn't get them working. I had much less grip.
"I thought it could be a problem with the first tyre and so I came back to the garage to change it but again I had the same issue.
"I am disappointed not to be on the front row, but the good feeling with the race tyres is good news."
Stoner leads Lorenzo by 44 points with four races of the season remaining.