The Briton whooped with delight over the team radio as his engineer told him the news.
“I feel very humble, very grateful. I’m ecstatic, like it’s my first,” said Hamilton after the session at Barcelona’s Circuit de Catalunya.
Red Bull’s Max Verstappen joined the championship-leading Briton, who has an eight-point lead after three races, on the front row with a time 0.036 seconds slower and another wheel-to-wheel duel looming on Sunday.
Valtteri Bottas qualified third for Mercedes, a week after the Finn took pole in Portugal.
Hamilton’s pole continued a remarkable run of Mercedes domination, with the champions taking the top slot in every race at the Spanish circuit since now-retired Nico Rosberg began the sequence in 2013.
“I can’t believe we’re at 100 and really it’s down to the men and women back at the factory who are continuously raising the bar and just never giving up,” said Hamilton, who will be chasing a record-extending 98th career win on Sunday.
“The support that I have, it’s been a dream for me to work with these guys, and the journey that we’ve been on has been immense.”
Only five constructors in the 71-year history of the sport have racked up 100 poles or more, and Hamilton’s milestone puts him far ahead even of Red Bull, who as a team have so far managed 64.
Hamilton, who took his first pole with McLaren in 2007, had set the fastest time of one minute 16.741 seconds with his first flying lap of the final phase and was unable to improve on it with his second.
It had looked like he had been slowed by Mexican Sergio Perez spinning his Red Bull ahead but there were no yellow warning flags.
Perez told reporters afterwards that he had been struggling with pain in his left shoulder that became worse as the session, delayed 10 minutes for marshals to fix barriers, wore on.
Ferrari’s Charles Leclerc qualified fourth with Esteban Ocon fifth on the grid for Alpine ahead of Ferrari’s Spaniard Carlos Sainz.
Australian Daniel Ricciardo will line up seventh for McLaren, one place ahead of Perez, with McLaren’s Lando Norris qualifying ninth and Spaniard Fernando Alonso 10th for Alpine.
Norris had been fastest in the first phase of qualifying, with Verstappen on top in the second part with a stunning 1:16.922 lap.
Hamilton meanwhile made small adjustments to find more pace and getting the “lazy” car to turn as he wanted before the final shootout.
“It’s quite gusty around here so the wind changes a lot,” said Verstappen. “But nevertheless I think second for us here on this track was very good today. We know they are hard to beat around here but to be that close, I can be happy.”
No driver has won from pole so far this season but the Barcelona circuit rewards grid position more than most, with the winner coming from pole 22 times in 30 races to date.
Hamilton has won there five times, including the last four, and is chasing his third win of a season that has become a battle between him and Verstappen, who is also celebrating his own century of starts for Red Bull.
The 23-year-old triumphed on his team debut in Barcelona in 2016, becoming at 18 the youngest ever race winner.
Further down the grid, Williams’ George Russell made it through to the second phase to take 15th on the grid.