Pierre Gasly logged the first time of the afternoon session on a 1:45.396, which he improved to a 1:43.216 to stay on top, but was eventually beaten by Sainz and Leclerc.
Sebastian Vettel spun at turn 16 on the hard tyres in his Aston Martin early on.
Nicholas Latifi brought out the red flags as the Williams ground to a halt on the exit of T16 due to an overheating engine. It brought his afternoon to a very early end.
Sainz led Leclerc, Gasly, Verstappen, Alonso, Tsunoda, Ricciardo, Giovinazzi, Perez and Raikkonen before the session resumed.
When the green flag was shown to get FP2 back underway, all the drivers went out on softs to attempt some qualifying positions.
Sainz lowered the fastest time to a 1:42.243, followed by Leclerc on a 1:42.436 as Ferrari stayed P1 and P2, followed by the impressive Antonio Giovinazzi 25 minutes into the session.
After setting a purple first sector on his second attempt, Leclerc hit the barriers into T16 and broke his front wing after carrying too much speed into the corner. A VSC was deployed to clear the wing.
It was Red Bull who took over at the top following the end of the VSC as Sergio Perez put his RB16B in P1 on a 1:42.115, 0.101s ahead of his teammate Max Verstappen. The Mexican’s lap remained unbeaten. Sainz, Leclerc and Gasly completed the top 5, with 0.419s covering Perez to Gasly.
Alonso, Giovinazzi, Norris, Ocon and Tsunoda completed the top 10.
Hamilton, Raikkonen, Ricciardo, Stroll, Vettel, Bottas, Russell, Mazepin, Schumacher and Latifi filled the second half of the timesheets.
Mercedes endured a very difficult FP2 as both Hamilton [P11] and Bottas [P16] finished miles down the order. Both drivers struggled to get the tyres working as the problems from Monaco continued for the seven-time defending champions.
📻 "Do whatever we need to do, I'm not going to go any faster. I don't know where all the time is"— Formula 1 (@F1) June 4, 2021
Hamilton is down in P11 currently, over a second off Perez's time in P1 ⏱#AzerbaijanGP 🇦🇿 #F1 pic.twitter.com/hl7Vihs2ve
As well as trouble for Mercedes, Mick Schumacher had a troublesome session as he was limited to just seven laps because of an oil pressure problem. It looked to have been fixed but the issue seemed to return after he completed a qualifying simulation lap.
Unsurprisingly, multiple drivers went down the run-off areas. Norris, Latifi, Bottas, Gasly, Vettel all had excursions on the tricky Baku street circuit.