Bottas had narrowly avoided a big accident early in the session.
Having led the championship heading into last month's Italian Grand Prix, Vettel has conceded 41 points to Hamilton in the three races since. Both the left rear and left front corners were damaged in the impact, but the vehicle was quickly removed and running could continue after a five-minute interruption.
"It's about ultimate performance from myself and also from the auto, so it is definitely great when it comes together on days like this".
However there was a scare for Hamilton's team mate Valtteri Bottas. Vettel, also now on the quicker rubber, could not come close. The second was even quicker as he proved utterly dominant on a circuit where he has never been on pole.
However, the Frenchman had been eliminated, along with Marcus Ericsson, Lance Stroll, Pierre Gasly and Pascal Wehrlein. It was triggered by Grosjean losing control going through the S-curves and crashing heavily into the barriers at Dunlop. "The auto is quick so it is up to us to put it in the right place".
Hamilton went out first in Q2, notably going with the supersofts for the new session.
Raikkonen's starting position is far from ideal for Ferrari, with the team needing to score a large haul of points this weekend if it is to relaunch its challenge to Merceredes in the Constructors' Championship. It was nearly seven tenths faster than Vettel's initial flying lap.
Mercedes finished second and fifth in a tricky Grand Prix, with Lewis Hamilton over twelve seconds off race-winner Max Verstappen and Valtteri Bottas almost a minute behind. He was ultimately a full four-tenths back.
All ten cars were out on track for a final push with two minutes to go.
On the other hand, the German driver Vettel had to face a rough time in Malaysia, as he had to deal with a power unit issues with his Ferrari and failed to clock time in the qualifiers. The next race is the Japanese Grand Prix, which will be on 8 October Sunday at Suzuka Circuit.
The penalty will elevate Vettel to the front row of the grid, putting the two title contenders side by side for Sunday's heavyweight battle between multiple champions.
Kimi Raikkonen suffered a crash in FP3 that forced him to change the gearbox, a five place grid penalty awaits him tomorrow in the main race.