Having led an Aprilia 1-2 at the end of first practice in Barcelona on Friday, Espargaro carried on his strong home form to top the second session by 0.362 seconds from team-mate Maverick Vinales.
Crucially, Espargaro got this lap in before a late yellow flag for Luca Marini’s stricken VR46 Ducati caused havoc for many riders still on flying laps.
Reigning world champion Francesco Bagnaia completed the top three at the end of a scrappy hour for the Ducati rider, while all Japanese bikes missed the Q2 qualifying cut.
In an embarrassing scene for Yamaha and Honda, all of its riders occupied the last places in the order from 17th to 22nd, with 2022 Catalan GP winner Fabio Quartararo leading them.
At the beginning of the hour-long session, Gresini Ducati’s Fabio Di Giannantonio set the initial pace at 1m40.908s, which he followed up with a 1m40.180s having gone out on a fresh soft rear tyre straight away.
With 35 minutes of the session to run, Ducati’s Bagnaia took over with a 1m40.149s, though the championship leader was far from happy as he continually struggled to get his GP23 stopped on the brakes into Turn 1.
This led to a frantic engineering discussion within the factory Ducati garage around Bagnaia, while Aprilia’s Vinales took over top spot about 10 minutes later with a 1m40.095s.
Vinales set the time just moments after nearly being flung from his RS-GP going through Turn 3 when the rear let go on him.
With just under 17 minutes remaining, Pramac Ducati’s Johann Zarco began a stint at the top of the order with a 1m40.061s, which he improved to a 1m40.047s.
This point signalled the beginning of the final time attack phase as the field looked to book Q2 spots.
Di Giannantonio returned to the top of the order with a 1m39.621s, before Vinales edged clear with a 1m39.594s.
Espargaro quickly took top spot away from Vinales with a 1m39.389s, before Zarco and then Vinales took turns leading again.
But a final effort of 1m38.686s, a new lap record, proved too much for the rest to topple Espargaro as the chequered flag flew.
Bagnaia was just 0.013s adrift of Vinales in third, with Zarco fourth and Brad Binder the only KTM through to Q2 automatically after ending the session fifth.
Alex Marquez was sixth on his Gresini Ducati from VR46’s Marco Bezzecchi, Di Giannantonio, Ducati’s Enea Bastianini and Pramac’s Jorge Martin.
Pol Espargaro was denied a place in the top 10 by just 0.028s on his Tech3 GasGas ahead of factory KTM rider Jack Miller, while a tumble for RNF’s Raul Fernandez midway through the session left him in 13th.
Marini was 15th after his late technical woes behind RNF’s Miguel Oliveira, while Augusto Fernandez (Tech3) headed the despondent Japanese manufacturers.
Quartararo was 1.4s off the pace on his Yamaha ahead of team-mate Franco Morbidelli, while Marc Marquez led the Honda’s in 19th.
MotoGP Catalan GP - FP2 results