Hamilton, who was also fastest in FP1, completed a late run on the soft tyres to depose long-time leader Max Verstappen.
The Red Bull drivers' lap from the first third of the session was set on the medium Pirelli rubber, as many drivers struggled to keep their soft rubber alive for the length of a lap on their subsequent qualifying simulation efforts on the softs.
The event's only night-time practice session took place with temperatures only a few degrees cooler than Friday afternoon's FP1 running, as the day-long cloud cover stopped the track surface heating up.
The majority of the field headed out on Pirelli's development 2021 C3 rubber at the start of the session, with only Antonio Giovinazzi and Lando Norris starting on the hard tyres, as Carlos Sainz's 1m30.989s led the early times.
Kimi Raikkonen then took over in P1 following a lull in action at the 20-minute mark as most drivers – notably not the Mercedes pair, who stayed out until 30 of the 90 minutes had been completed – came in to switch to the regular rubber.
But the Alfa Romeo's 1m30.928s on the mediums was beaten a few minutes later by Verstappen's 1m29.318s, which stood as the benchmark until under 15 minutes to go.
Verstappen had set a then best first sector time with his first soft tyre effort approaching the halfway stage, but he faded slightly compared to his medium tyre time and did not improve.
Valtteri Bottas then essentially repeated that display with his soft tyre run a few moments later, as the Finn was 0.1s up on Verstappen's medium tyre time only to lose significantly in the final sector and finish behind.
The session was then interrupted when Albon wiped off much of the right-hand side and rear of his RB16 when he went off into the barriers at the final corner.
Albon had dipped off the kerbs exiting the turn and as he caught a snap of oversteer on the dusty run-off area, the car snapped left and sent him spinning into the nearby gravel trap and then heavily into the barriers beyond.
The car bounced back towards the track, where Albon climbed from the wreckage – in similar circumstances to his final corner crash in practice for the 2019 Chinese Grand Prix – and the session was red flagged for 10 minutes as it was removed.
When it got underway again, the pack headed back out only to be quickly called in again when it became apparent that had a dog had crawled under one of the track's boundary fences and then run down a bank and onto the circuit.
It soon bounded off towards another wall, but its interruption caused another delay of five minutes.
The damage to the rear of Alex Albon's Red Bull Racing RB16
Mark Sutton / Motorsport Images
But the session resumed and ran to the end thereafter, with both Mercedes drivers immediately having a go at toppling Verstappen.
Bottas did not improve, while Hamilton, who had not completed a flying lap before the stoppages as his early running on the development tyres had left him several seconds on the pace, did jump up the order, but only to sixth, 0.271s off P1.
As most of the field switched to a slightly diminished period of long-run data gathering, Mercedes have Hamilton another run, which he used to finally better Verstappen's medium tyre lap.
The world champion blitzed his way to the fastest times in the opening two sectors, and while although he lost a little bit in the final third, he was still able to go top with a 1m28.971s.
That put him 0.347s clear of Verstappen, with Bottas third and Sergio Perez fourth.
Daniel Ricciardo finished fifth ahead of Pierre Gasly and Norris, who did his development tyre running after the second restart, as did Giovinazzi.
Lance Stroll was eighth in the second Racing Point, while Daniil Kvyat and Albon rounded out the top 10 – their best times also set on the medium tyres, although Albon was on a soft tyre run when he crashed.
Sebastian Vettel was the lead Ferrari driver in 12th, while Charles Leclerc ended up P14 – having nearly spun in the early stages as he caught a snap of oversteer accelerating through Turn 3.