The MotoGP Championship leader Marquez cracked his #1 starting position for the fourth race in succession.
Valentino Rossi was second fastest with Cal Crutchlow third.
Marquez scorched around the Sepang circuit in 2:0.011s with his final tour.
He made a mistake on his penultimate lap that left him with little margin for error on his final attempt.
“I'm really happy with this pole position, particularly as earning it was a little different to with my previous poles,” Marquez said.
“At the start of qualifying there were two completely wet corners, which made it hard to put in a hot lap as we had to calculate the amount of risk, whilst still maintaining our speed.
Jorge Lorenzo was fourth fastest ahead of Dani Pedrosa with Alvero Bautista sixth.