The Brit, who was behind Vettel in the World Championship, was 0.179 seconds behind the German and a few tenths ahead of Silver Arrow's team-mate Valtteri Bottas.
The Red Bulls of Daniel Ricciardo and Max Verstappen were the next in fourth and fifth, the former conceded his teammate after he had gratefully towed by a recovering Raikkonen.
The Top 10 in an exciting session completed the Force Indias of Esteban Ocon and Sergio Perez appearances of the year, and the Renaults of Nico Hulkenberg (who went into qualifying with a five-place grid drop over qualifying) and Carlos Sainz.
Q1 had started drama almost from the beginning. The session was barely four minutes old when Romain Grosjean became the first victim. A huge lock-up on Turn 3 forced him to flee, causing a large flat spot on his left front tire ̵
Like the one in this season, Raikkonen started the qualifying in an impressive manner and was the better of the two Ferraris at the beginning of the first quarter.
With the 10 designers starting early on the fastest ultra-soft tire, Force India continued to show signs of improvement with Ocon temporarily pacing P2 ahead of Mercedes and Red Bull.
Ocon team-mate, Perez, perhaps tried too hard to exploit the French correspond to. Turn 15 turned out to be a big question again, the Mexican shortened the curve and ruined a set of tires.
The opening round began to heat up, with Räikkönen still taking the lead when Pierre Gasly and Brendon Hartley's Toro Rosso duo almost collided in a very lucky escape.
A slow-moving Hartley hobbled after a puncture from Turn 14, when an approaching Gasly came around the corner and collided at full speed within a few centimeters
Both Toro Rossos finally left Q1, followed by McLaren's Stoffel Vandoorne Clean Marcus Ericsson – the only rider who did not reach Q2 this season – and Grosjean. On the positive side, rookies Charles Leclerc and Sergey Sirotkin moved to Q2 for the first time this year.
In the second segment, the three best teams – Ferrari, Mercedes and Red Bull – threw all their drivers out with a super-soft rubber. The rest of the field appeared in the Ultrasoft.
And unlike the opening session, it was not long before the difficult turns produced the best and worst rider.
Räikkönen suffered the most, after making a costly mistake and flattening his tires, forcing him to retire to the pits for Ultrasofts – a move that will surely compromise him in the race when everything around him is out Finn has at least made good use of his purple tires and finished the session just over a tenth of a second faster than Hamilton as Williams of Lance Stroll and Sirotkin, along with McLaren's Fernando Alonso, Saubers Leclerc and Haas' Kevin Magnussen (whose car Body lost) on a level) the unfortunates were unable to reach Q3.
So, who would come with the goods in the crucial final session? Ferrari put down the gauntlet when Vettel made an excellent lap to go to the top, an impressive 0.342 seconds ahead of Hamilton.
And this round would finally be enough for the German to secure his first hat-trick of the pole positions since 2013 On a day when Ferrari alone on speed the 60th row of the first row in the history of F1 should win.
With the first four starting places in the championship order and big gusts predicted to hit Baku on Sunday, the stage is ready for a thrilling Grand Prix.
The Key Quote
"The good point is that our car was really good this afternoon, so it should be good tomorrow … Yesterday I fought a bit with confidence and confidence in the car and the rhythm, but today, when it clicks, it just keeps on going. "- Sebastian Vettel
- Vettel's Pole was his third consecutive year – for the first time this performance in this turbo-hybrid era (last time: Italy , Singapore, Korea 2013)  Hamilton Launches Grand Prix in First Row Series for the First Time in Australia
- Hamilton has succeeded in overtaking Mercedes team-mate Bottas for the second time in the last six races  Raikkonen's sixth place is his worst ever start in Baku and the first time this season that he is not second
- Ricciardo and Verstappen have now faced each other in changing race 2018
- Ocon Force-out has given Force India the best starting position in 2018 – it was also the first time this season that both cars reached Q3
- rookies Sirotkin and Leclerc arrived in their F1 careers
- Williams first time on Q2, their series of back-to-back Q1 finishes eliminating ons with both cars. Stroll Takes 10th Place After Hulkenberg's Five-place Grid Penalty
The Sunday race starts at 16:10 local time (12:10 UTC) with a sunny but windy weather.