Just as in Friday's practice, Marquez set the early pace but Bezzecchi lit up the timing screens in the final sector to go fastest at the Autodromo Internacional do Algarve with a time of one minute and 37.556 seconds.
KTM's Pedro Acosta was second fastest on one of his favourite tracks as the young Spaniard clinched a front-row spot for the first time this season, while Yamaha's Fabio Quartararo was third fastest.
"I'm very happy, very happy because from yesterday we made a good step and today I was able to be fast since the beginning," Bezzecchi said.
"I'm very grateful to my team, to my guys. Now we have, of course, the two main events - the sprint today and the race tomorrow - but for the moment I'm enjoying."
Marquez had set the early pace, just as he did in Friday's practice, but his bid to improve his time ended in the gravel and the crash allowed Ducati's Francesco Bagnaia to leapfrog him, pushing the younger Marquez brother down to fifth and a second-row start.
Trackhouse Racing's Raul Fernandez withdrew from the Grand Prix following a nasty crash in Friday's practice, where the Spanish rider looked visibly shaken after he slid off the track and tumbled in the gravel while his bike cartwheeled into the fence.
"The discomfort in his left shoulder is such that the decision has been taken on the grounds of Raul’s well-being and safety. He will commence treatment in an effort to be fit for the final round of the Championship, at Valencia, in one week," the team said.
Ducati's Marc Marquez, who clinched his seventh championship in Japan, decided to sit out the rest of the season due to injuries he suffered in a crash in Indonesia.
However, with Alex's crash, Marc will finish the season as MotoGP's best qualifier and will be handed the keys to a brand-new BMW car.
