Red Bull's championship leader Max Verstappen, 14 points clear of his British rival with three races to go, will join him on the front row on Sunday but was nearly half a second slower in Saturday's floodlit evening session.
Hamilton clocked 1 minute 20.827 seconds on the 5.38-kilometre Losail International Circuit which in the past has only seen MotoGP racing. It was his fourth pole of the season and a record-extending 102nd overall.
Also Read | Kashmiri skier Arif Khan qualifies for 2022 Beijing Winter Olympics
Earlier, carrying over his impressive form from Friday, Valtteri Bottas led Hamilton in an ominous Mercedes one-two in the final practice for the inaugural Qatar Grand Prix on Saturday.
Bottas, who has taken three pole positions in the last four races and lapped fastest in Friday practice, put in the best time of one minute 22.310 seconds and was 0.078 quicker than Hamilton.
Red Bull's championship leader Verstappen, who is 14 points clear of Hamilton with three races remaining in the Middle East, was third fastest but 0.341 seconds off the pace set by Bottas.
Also Read | ISL 2021-22: Bengaluru FC register 4-2 win against NorthEast United
"Yesterday was a really difficult day for me -- I really struggled through that practice yesterday," Hamilton said.
"I was here until midnight last night working with the engineers and found a little variation where I could improve, made some changes for third practice and it worked but -- then you have to carry that through to qualifying," he said after the race.
"That last lap was beautiful, it is an amazing track to drive and it felt good. I had a bit of a stomach ache from Wednesday but I slept really well last night and that made a bit of a difference," Hamilton added.