The Briton, stung by Sebastian Vettel in Melbourne two weeks ago, pipped his German rival by two tenths of a second in Shanghai with Mercedes team-mate Valtteri Bottas and Ferrari’s Kimi Raikkonen filling row two for Sunday’s race.
Hamilton jumped onto the pit wall to soak in the adulation of the crowd after clocking the fastest lap of one minute, 31.678 seconds to capture his fourth Chinese pole in five years.
“We knew it was going to be close,” said Hamilton, forced to play second fiddle to Vettel in the third practice session earlier in the day.
“I managed to just chip away at it from session to session. It’s exciting for me because we really fight with these guys,” added Hamilton, a four-time winner in Shanghai.
“That’s what racing is all about. It really pushes you to raise the bar each time you go out there.”
Vettel, meanwhile, was left shaking his head in disbelief.
“I don’t believe that, it was the perfect lap,” said the four-time world champion, who looked unstoppable in Saturday’s practice run.
“I think we can still improve, so let’s see what the race looks like tomorrow. Conditions will be different.”
The signs point to another furious battle between Mercedes and Ferrari but with rain forecast for race day, Red Bull’s Daniel Ricciardo could fancy his chances after qualifying fifth.
Team-mate Max Verstappen gets an unwanted opportunity to test the theory that overtaking has become harder in the new wider Formula One cars after only qualifying in 19th.
Ricciardo will start alongside Felipe Massa on the third row after the Brazilian clocked the sixth fastest time for Williams.
Behind them, Renault’s Nico Hulkenberg edged out Sergio Perez’s Force India for seventh with Daniil Kvyat’s Toro Rosso and Lance Stroll’s Williams rounding out the top 10 places on the grid.
Very much in the shop window for 2018, former world champion Fernando Alonso appeared pleased enough after steering his underperforming McLaren to 13th as he boasted over the team radio: “I pushed like an animal!”
There was a hairy moment at the end of the first session of qualifying when Antonio Giovinazzi smashed his Sauber into a wall on the pit straight, although the Italian walked away unhurt.