It will be the 20th time in his career that Stoner starts from pole in MotoGP, but the first time since the season-opening Qatar Grand Prix in April.
"I've had a difficult season with lots of crashes and I hope to be back fighting with the very best tomorrow," said Stoner, the 2007 world champion.
Stoner was the only rider to break the 1min 49sec barrier, edging current championship leader Jorge Lorenzo (Yamaha) by 0.309sec and the in-form Dani Pedrosa (Honda) by 0.401sec.
Pedrosa, who shone in Friday's first free practice session, topped the time-sheet for three quarters of Saturday's qualifying session before Stoner dislodged him with an initial time of 1:49.525.
Pedrosa resumed control 10 minutes from the end with a 1:49.343 lap, only for the Australian to get ahead of him again with a time of 1:48.942.
Lorenzo nipped in to take second place after Pedrosa miscued while braking on his final lap.
"I'm riding well and I am happy about how I have improved my riding style in every practice to better suit this new track," said Lorenzo.
"I also understand the track better on every lap so this helps me to be faster. We are losing some time on the straight at the end of the lap so we have to be very strong in all the other parts to try to make up for it."
Stoner's Ducati team-mate Nicky Hayden took fourth place ahead of Yamaha's Ben Spies and Frenchman Randy de Puniet (Honda).
Six-time MotoGP champion Valentino Rossi (Yamaha) will start from seventh place.
"Unfortunately, with the softer Bridgestone tyre at the end for my fast lap I made a small mistake and lost half a second, otherwise I think I could have been fourth," said Rossi.
"Now we have to start from the third row and the start of the race will be very important because I have to try to improve my position and stay with the leaders."
With six races of the 2010 season remaining, Lorenzo leads fellow Spaniard Pedrosa by 63 points at the top of the championship standings.
Qualifying results on Saturday for Sunday's Aragon Grand Prix at the 5.078km Motorland Aragon Circuit:
1. Casey Stoner, Australia, Ducati, 1 minute, 48.942
2. Jorge Lorenzo, Spain, Yamaha, 1:49.251
3. Dani Pedrosa, Spain, Honda, 1:49.343
4. Nicky Hayden, United States, Ducati, 1:49.506
5. Ben Spies, United States, Yamaha, 1:49.565
6. Randy De Puniet, Honda, France, 1:49.952
7. Valentino Rossi, Italy, Yamaha, 1:50.017
8. Andrea Dovizioso, Italy, Honda, 1:50.046
9. Marco Simoncelli, Italy, Honda, 1:50.088
10. Hector Barbera, Spain, Ducati, 1:50.323