Pedrosa had been fastest on the opening day and also took a clean sweep in the first test at the Malaysian circuit earlier in the month.
Lorenzo ended that run on Wednesday with a 2m00.282s, his fastest lap so far at Sepang and also more than three tenths of a second faster than Pedrosa could manage on the day.
For the first time this winter the top three was completed by a satellite bike as Cal Crutchlow shrugged off a lack of updates to put Tech 3 third.
Marc Marquez and Valentino Rossi, on the second Honda and Yamaha respectively, both got within 15 thousandths of a second of Crutchlow.
Rossi's deficit of 0.783 seconds to Lorenzo was however the largest it has been over winter testing.
Alvaro Bautista was the last man to get within one second of Lorenzo, helping him to edge out fellow Honda satellite rider Stefan Bradl and the two works Ducatis of Nicky Hayden and Andrea Dovizioso.
In a reverse of the day one order Pramac rider Andrea Iannone this time managed to edge out top CRT man Aleix Espargaro, although the Spaniard and Avintia rider Hector Barbera both had the better of Iannone's team-mate Ben Spies.
The American, returning from a long injury lay-off, suffered an early fall at Turn 1 but emerged unhurt.
Michael Laverty meanwhile turned his first laps on the new Paul Bird chassis, managing three installation laps in the morning and a further 16 in the afternoon.