The qualifying session for Round 8 of the 2017 F1 season, the Azerbaijan Grand Prix, took place at the Baku City Circuit. The three qualifying stages were Q1, Q2 and Q3.
Lewis Hamilton took pole position with a Q3 lap of 1:40.593, a margin of 0.434 seconds. Valtteri Bottas was second in 1:41.027, with Kimi Räikkönen third in 1:41.693.
The top ten in qualifying, in order, were Lewis Hamilton, Valtteri Bottas, Kimi Räikkönen, Sebastian Vettel, Max Verstappen, Sergio Pérez, Esteban Ocon, Lance Stroll, Felipe Massa and Daniel Ricciardo.
Daniil Kvyat, Carlos Sainz, Kevin Magnussen, Nico Hülkenberg and Pascal Wehrlein qualified 11th to 15th, respectively.
The remaining classified drivers were Fernando Alonso in 16th, Romain Grosjean in 17th, Marcus Ericsson in 18th and Stoffel Vandoorne in 19th. Palmer did not take part in qualifying and recorded no time.
| Position | Car No. | Driver | Team | Q1 Time | Q2 Time | Q3 Time | Laps |
|---|---|---|---|---|---|---|---|
| 1 | 44 | Lewis Hamilton | Mercedes | 1:41.983 | 1:41.275 | 1:40.593 | 20 |
| 2 | 77 | Valtteri Bottas | Mercedes | 1:43.026 | 1:41.502 | 1:41.027 | 23 |
| 3 | 7 | Kimi Räikkönen | Ferrari | 1:42.678 | 1:42.090 | 1:41.693 | 23 |
| 4 | 5 | Sebastian Vettel | Ferrari | 1:42.952 | 1:41.911 | 1:41.841 | 23 |
| 5 | 33 | Max Verstappen | Red Bull | 1:42.544 | 1:41.961 | 1:41.879 | 22 |
| 6 | 11 | Sergio Pérez | Force India | 1:43.162 | 1:42.467 | 1:42.111 | 21 |
| 7 | 31 | Esteban Ocon | Force India | 1:43.051 | 1:42.751 | 1:42.186 | 21 |
| 8 | 18 | Lance Stroll | Williams | 1:43.613 | 1:42.284 | 1:42.753 | 21 |
| 9 | 19 | Felipe Massa | Williams | 1:43.165 | 1:42.735 | 1:42.798 | 22 |
| 10 | 3 | Daniel Ricciardo | Red Bull | 1:42.857 | 1:42.215 | 1:43.414 | 20 |
| 11 | 26 | Daniil Kvyat | Toro Rosso | 1:42.927 | 1:43.186 | — | 19 |
| 12 | 55 | Carlos Sainz | Toro Rosso | 1:43.489 | 1:43.347 | — | 20 |
| 13 | 20 | Kevin Magnussen | Haas | 1:44.029 | 1:43.796 | — | 18 |
| 14 | 27 | Nico Hülkenberg | Renault | 1:43.930 | 1:44.267 | — | 12 |
| 15 | 94 | Pascal Wehrlein | Sauber | 1:44.317 | 1:44.603 | — | 18 |
| 16 | 14 | Fernando Alonso | McLaren | 1:44.334 | — | — | 9 |
| 17 | 8 | Romain Grosjean | Haas | 1:44.468 | — | — | 10 |
| 18 | 9 | Marcus Ericsson | Sauber | 1:44.795 | — | — | 10 |
| 19 | 2 | Stoffel Vandoorne | McLaren | 1:45.030 | — | — | 8 |
| DNS | 30 | Jolyon Palmer | Renault | — | — | — | 0 |