Martin narrowly edged out factory Ducati rider Francesco Bagnaia by only 0.063s, with former COTA winner Alex Rins putting the LCR Honda into third, two tenths down on Spain's Martin.
Luca Marini, who set the pace in the first free practice session, slipped to fourth on the time sheets on the VR46 Ducati.
Championship leader Marco Bezzecchi (VR46 Ducati) – who clinched his maiden MotoGP victory last time out in Argentina – was knocked out of the top 10 in the final moments, ending the session in 11th position, and will now have to participate in Qualifying 1.
There were several fallers in the one-hour timed practice, including Miguel Oliveira, who went down twice on the RNF Aprilia.
The Portuguese rider went for an early time attack, possibly mindful of the threat of rain after some light spots fell prior to FP2, and posted the third quickest lap before a fast off at Turn 3.
Oliveira, back in action after being taken down by Marc Marquez in a controversial incident in Portugal at the season-opener, later crashed again at Turn 12, eventually ending the session in 15th place.
A flurry of fast laps during the final 15 minutes saw a number of different leaders, including Martin, Rins, Aleix Espargaro (RNF Aprilia), Marini and Bagnaia.
However, it was Martin who held sway when the chequered flag went out as he put down a marker for Q2 with a time of 2:02.178s from Bagnaia, Rins and Marini.
Alex Marquez (Gresini Ducati) held fifth ahead of Maverick Viñales (RNF Aprilia), while Fabio Quartararo (Monster Energy Yamaha) dropped five places from FP1 to seventh after impressively saving a feet-off-the-pegs moment on the YZR M1.
Zarco's tumble caused Mir to go down as he took evasive action, with the resulting yellow flags cancelling out some riders' final laps.
Mir was 12th fastest, with Zarco 14th, HRC test rider Bradl – standing in for the injured Marquez this weekend – 20th and Fernandez 21st.