Barely more than two tenths of a second covered the Mercedes and Ferrari drivers after the first runs in Q2, with Vettel fractionally ahead of Hamilton, followed by Valtteri Bottas and Kimi Raikkonen - who eventually went fastest in that segment by doing a second run when the others didn't.
But Hamilton moved into the ascendency at the start of Q3, leading Vettel by almost two tenths of a second after the first runs despite running wide out of Turn 3 and suffering a snap of oversteer at the exit of Turn 11.
The Mercedes driver improved to a 1m31.678s best on his final run with a cleaner lap, claiming pole by just 0.186 seconds.
Vettel joined Hamilton in the 1m31s on his own final flying lap, but he failed to improve in sector one and lost out. When informed by Ferrari he had missed pole by two tenths, Vettel reckoned "I didn't have that" time in the car.
Bottas put in an excellent final lap in Q3, but missed out on beating Vettel to the front row by just one thousandth of a second.
Raikkonen fell away in Q3, ending up fourth complaining of understeer, nearly three tenths back from Bottas.
Red Bull reckoned Daniel Ricciardo got everything out of his car in posting the fifth quickest time, nearly 1.5s away from pole but almost half a second clear of Felipe Massa's Williams.
Nico Hulkenberg was sixth fastest in Q2 and chose to complete his solitary Q3 run at the start of that session instead of the end, but this was still good enough for seventh place for Renault.
Force India's Sergio Perez was eighth, just ahead of Daniil Kvyat's Toro Rosso, while rookie Lance Stroll rounded out the top 10 in the second Williams on his first Q3 appearance.
The battle to make it into the top-10 shootout was extremely tight between Stroll, Perez, the two Toro Rossos, and Kevin Magnussen's Haas.
Carlos Sainz Jr missed the top 10 cut by just 0.060s after failing to improve on his second Q2 run, while Magnussen was only 0.014s further back in 12th.
Fernando Alonso wrung the neck of the McLaren-Honda to make the top-10 in Q1 and eventually qualify 13th fastest, just over two tenths down on the Haas and almost seven tenths clear of Marcus Ericsson's Sauber.
Sauber unexpectedly got both cars through to Q2, thanks to Antonio Giovinazzi crashing heavily at the final corner just as the chequered flag came out at the end of Q1 - which delayed other drivers who were yet to complete their laps.
The Ferrari third driver took no part in Q2 so was classified 16th, ahead of Romain Grosjean's Haas, Jolyon Palmer's Renault, and Esteban Ocon's Force India, which all had to abort their final flying laps in Q1.
The second McLaren of Stoffel Vandoorne was unaffected, but his best lap was not good enough to displace Giovinazzi, so Vandoorne missed the cut by just 0.060s.
Melbourne qualifying star Grosjean had earlier spun exiting the final corner, ruining his first Q1 run, so he wound up only 17th fastest, two tenths behind Vandoorne.
Palmer was 18th fastest and Ocon last, both sandwiching the Red Bull of Max Verstappen, who struggled with a suspected engine problem throughout the session.
Both Grosjean and Palmer are also under investigation by the FIA, for allegedly failing to slow sufficiently under yellow flags at the end of Q1.
China GP Qualifying
|5||Daniel Ricciardo||Red Bull/Renault||1m33.033s||1.355s|
|8||Sergio Perez||Force India/Mercedes||1m33.706s||2.028s|
|9||Daniil Kvyat||Toro Rosso/Renault||1m33.719s||2.041s|
|11||Carlos Sainz||Toro Rosso/Renault||1m34.150s||2.472s|
|17||Max Verstappen||Red Bull/Renault||1m35.433s||3.755s|
|18||Esteban Ocon||Force India/Mercedes||1m35.496s||3.818s|