Formula 1 championship leader Sebastian Vettel was second, three places ahead of title rival Fernando Alonso.
Both Vettel and Alonso had spells on top during the afternoon, but Hamilton moved comfortably clear in the closing stages when the field switched to the softer tyres.
It was Alonso's Ferrari team-mate Felipe Massa who held sway at first, before being usurped by Vettel's Red Bull after 12 minutes.
Vettel's 1m15.226s was good enough to keep him on top for nearly half an hour, although Jenson Button came within a few fractions of displacing him.
It was Alonso who eventually did push the champion off the top, putting in a 1m15.150s.
That was the last benchmark time of the hard-tyre period, with Romain Grosjean becoming the first frontrunner to try the medium compound shortly afterwards. The Lotus did not need long to beat Alonso.
There followed a frantic spell in which Nico Rosberg, Massa and then Hamilton held the top spot within two minutes.
But once back in front, Hamilton - in his McLaren swansong - would stay there. His 1m14.026s lap was half a second clear of the field at that stage, and the closest anyone could get was Vettel's 1m14.300s.
Mark Webber completed the top three in the second Red Bull, ahead of the Ferraris of Massa and Alonso.
Mercedes was near the leaders throughout the session, with Michael Schumacher and Rosberg ending up sixth and seventh, followed by Button and Grosjean.
Paul di Resta pipped Force India team-mate Nico Hulkenberg by just 0.002s to grab the final top-10 spot.
At the back, HRT again completed significantly less mileage than its rivals, while Charles Pic had to park his Marussia with what the team believes was an alternator problem.
- Sports & Recreation
- Motor Racing
- Fernando Alonso
- Sebastian Vettel
- Felipe Massa