Dovizioso grabbed the advantage with just two minutes to go in the 45-minute session amid a late flurry of quick times at Sepang, posting a 1m59.697s to knock Jack Miller off the top spot.
Miller had been the first rider to break the two-minute barrier just a few minutes earlier, but his best time of 1m59.941s was beaten by both factory Yamaha riders late on.
Valentino Rossi managed to set a time just 0.070s slower than Dovizioso to slot into second, while Phillip Island winner Maverick Vinales slotted into third ahead of Miller a further 0.161s behind.
Malaysia Grand Prix
Vinales: Matching Rossi/Marquez was impossible
05/11/2018 AT 13:40
Danilo Petrucci brought a third Ducati into the top five with a time two tenths slower than Pramac team-mate Miller, while Alex Rins led the Suzuki charge in sixth after Thursday's pitlane fire.
Completing the top 10 were Aleix Espargaro, Alvaro Bautista, Johann Zarco and Marc Marquez, who as per usual did not run a new tyre at the end of the session on his factory Honda.
The world champion ended the session 1.104s off Dovizioso's pace, finishing up a place ahead of the second Suzuki of Andrea Iannone.
Marquez's team-mate Dani Pedrosa was 16th fastest, just behind LCR stand-in and Honda test rider Stefan Bradl.
Jorge Lorenzo ended up 24th and slowest as he returned to MotoGP action for the first time since first practice two weeks ago at Motegi, his best time of 2m03.204s leaving him 3.504s off the pace.
The Spaniard was reported to still be in pain from his left wrist that he fractured in a crash in Thailand last month, with the same injury forcing him to sit out the following race in Japan after an abortive run in FP1.
Ducati test rider Michele Pirro is on standby should Lorenzo be forced to withdraw again.
Xavier Simeon was the one and only rider to crash during the session, going down at the long Turn 14 right-hander at the very end of the session.
Malaysia Grand Prix
Zarco gains pole after Marquez impeding penalty
03/11/2018 AT 12:00
Malaysia Grand Prix
Marquez claims Sepang MotoGP pole despite fall
03/11/2018 AT 10:10