World champion Lorenzo banged in a sub-lap-record 2m02.734s as his very first lap of the afternoon.
Marquez also pushed from the outset, but his Honda trailed the Yamaha by four tenths of a second.
That was how they remained until the final few minutes, when Marquez got the gap down to 0.224 seconds.
Lorenzo could not be deposed, though, as he ended the first day of the British Grand Prix weekend on top.
Two Hondas then two Yamahas completed the top six.
Marquez's team-mate Dani Pedrosa and Gresini's Alvaro Bautista were third and fourth, ahead of Yamaha duo Valentino Rossi and Cal Crutchlow.
Aleix Espargaro was fastest in CRT as usual, beating Yonny Hernandez for class honours, but he missed out on an overall top-10 spot by 0.056s.
Gresini's CRT rider Bryan Staring was the only man to crash, limping away from his bike at Farm.
Follow the MotoGP weekend as it happens on Race Centre Live