Two weeks after Hamilton opened a 28-point lead over the Ferrari driver with victory in Singapore as Vettel crashed out, the German will start last at Sepang.
Vettel suffered an engine problem in final practice and although it was changed for qualifying, it did not run properly. Hamilton fought off a challenge by Vettel's team-mate Kimi Raikkonen despite Mercedes struggling all weekend in Malaysia.
Red Bull's Max Verstappen was third fastest from team-mate Daniel Ricciardo while Hamilton's team-mate Valtteri Bottas could manage only fifth, 0.682secs adrift.
Raikkonen may well rue a lock-up at the final corner on his final qualifying lap. The Finn was on course to take pole from Hamilton until that error and ended up losing out by just 0.045 seconds.
Bottas was using the new aerodynamic upgrade that Mercedes suspected caused problems on Friday. The team split their set-ups on Saturday, with the Finn using the new parts and Hamilton reverting to an older set-up.
It was a remarkable fight back from Mercedes, who were more than a second off the pace in practice on Friday and still 0.5secs off in the final session on Saturday. But Mercedes were in the ball park from the start of qualifying and Hamilton pulled out another stunning lap to secure pole.
He was faster than Raikkonen by 0.232secs on his first run, and the margin was just too big for the Finn to turn around on his final lap.
"I have no idea how the guys turned it around but I am really grateful," Hamilton said.
And now what happened to Vettel? Vettel did get out in the first qualifying session after the Ferrari mechanics changed his engine, but the German immediately radioed to say he was down on power. He returned to the pits but the team ran out of time to diagnose the problem, let alone fix it.
Vettel was phlegmatic about his bad luck.
"I tend to enjoy what I do and today there was not much to enjoy or do but I am sure it will be a good race. We have a very strong car. It is what it is," he said.
"Who knows what will happen tomorrow? The car is quick. That's maybe why I am pretty relaxed. With a quick car, you can come back, and overtaking is possible here," he added.