Teammate Valtteri Bottas held an advantage of 0.457s after the first runs in Q3, but Hamilton turned the tables with his second set of softs to post a 1m20.486s and secure pole.
Bottas failed to improve on his second run, meaning he ended up 0.112s behind.
After showing strongly in pre-season testing, the lead Ferrari of Sebastian Vettel was a massive 0.704s off pole position having never shown Mercedes-threatening pace this weekend.
Red Bull driver Max Verstappen split the Ferraris on the team’s debut weekend with Honda, lapping just over a tenth slower than Vettel.
That left Ferrari debutant Charles Leclerc fifth, 0.956s off the pace.
As anticipated, Haas led the midfield, with Romain Grosjean taking sixth place ahead of teammate Kevin Magnussen.
One of the stars of qualifying was debutant Lando Norris, who qualified eighth and 1.818s off the pace after a strong performance in both Q2 and Q3.
Kimi Raikkonen was ninth, just 0.010s behind Norris, on his Alfa Romeo return with Sergio Perez 10th for Racing Point.
The two Renault drivers were both eliminated in Q2, with Nico Hulkenberg 11th after being pushed into the drop zone by Perez, who lapped 0.030s faster.
Hulkenberg had gone out for a second run, but aborted that run after what he reported as a boost pressure drop-out and had to rely on his first-run time, which was compromised by time lost in the final sector.
Daniel Ricciardo was 0.008s slower after being unable to make a big enough improvement on his second run to remain in the top 10, admitting he didn’t have the confidence early in the lap after traffic compromised his out-lap.
Alex Albon was the fastest of the Toro Rosso drivers in 13th place, 0.138s faster than returning teammate Daniil Kvyat, who was 15th – the duo sandwiching the second Alfa Romeo of Antonio Giovinazzi.
Racing Point’s Lance Stroll was quickest of those eliminated in Q1 having momentarily jumped up to eighth after being one of the first drivers to set a time on his second set of tyres before being bumped into the drop zone by late improver Ricciardo.
Stroll complained over the radio about being impeded by another car during the session, which he identified as either a Haas or a Toro Rosso.
Despite lapping only 0.144s slower than teammate Verstappen, Red Bull debutant Pierre Gasly was a high-profile victim in Q1 in 17th place.
He was one of only five drivers not to attempt a second run in the first segment in qualifying and was shuffled down amid the late flurry of improvements, describing the strategy as “a bit optimistic”.
Carlos Sainz’s first qualifying session for McLaren ended in disappointment in 18th place, just over half a tenth behind Gasly.
Unsurprisingly, the final two places were filled by the Williams drivers, with George Russell the faster of the two after lapping 1.276s slower than Sainz.
Robert Kubica, in his first F1 qualifying session since the 2010 Abu Dhabi Grand Prix, was last and 1.707s behind Russell.
He was unable to improve on his second run after kissing the wall exiting the Turn 9/10 right/left, which gave him a right-rear puncture that manifested itself at the approach to Turn 11.