The Australian pipped McLaren teammate Lando Norris by just 0.082s, while champion-elect Max Verstappen was left third after having his best lap time deleted for track limits.
But the Dutchman remains on course to clinch his third world title in Saturday’s sprint race, knowing he only needs to finish inside the top-six and take three points or more.
"Very very happy," Piastri said. "It was a pretty good lap. I saw Lando on the big screen made a mistake at the last corner.
"I struggled quite a bit in the first two parts of that qualifying then got my act together for the last one. Very happy, great work from the team.
"Max is only starting third, so he's not a million miles away. We will try our best. A question mark on tyres, so we will do our best and see what we can pull off."
Mercedes’ George Russell was fourth-fastest ahead of the Ferrari duo of Carlos Sainz and Charles Leclerc.
Nico Hulkenberg was an impressive seventh for Haas, ahead of Red Bull’s Sergio Perez and Aston Martin’s Fernando Alonso, who also had his fastest lap deleted.
Esteban Ocon completed the top-10 ahead of Alpine teammate Pierre Gasly, while Lewis Hamilton suffered a shock SQ2 elimination in 12th.
The seven-time world champion had multiple laps deleted for running too wide at Turn 13 but was off the pace anyway.
The 19-lap sprint race gets underway at 6.30 UK time.