Williams duo Valtteri Bottas and Felipe Massa locked out the second row, while a last-gasp flyer from Kevin Magnussen lifted the Dane into fifth and into a share of the third row with McLaren team mate Jenson Button.
Hamilton set the pace from the outset, topping Q1 with 1m 25.363s as all the leading runners ran the hard-compound Pirelli tyres. Rosberg was close behind, with Massa then leading Bottas.
Further down, Lotus had a tough time, with neither Pastor Maldonado nor Romain Grosjean able to progress into Q2. The Venezuelan was told to stop changing gear as the team sensed transmission problems, and having been on the bubble in 17th was therefore unable to improve upon his best of 1m 27.520s. Grosjean, meanwhile, was delayed at the start of the session and eventually slotted into 18th on 1m 27.632s.
That did at least put both E22s ahead of the Caterhams and Marussias - but it was close, as Kamui Kobayashi took his CT05 round in 1m 27.671s to head Jules Bianchi's MR03 on 1m 27.738s. Then came Max Chilton on 1m 28.247s and Marcus Ericsson on 1m 28.652s.
Hamilton and Rosberg each failed to improve on their first-run times in Q2, but they still set the pace ahead of Bottas and Massa.
A late charge by Magnussen bumped Kimi Raikkonen down to 11th, with the Ferrari driver unable to respond as two late, scrappy efforts consigned him to a Q2 exit. He was pushed down further by Daniil Kvyat, who lapped his Toro Rosso in 1m 26.070s to the Finn's 1m 26.110s. However, the Russian will drop to a provisional 21st on the grid thanks to a ten-place penalty for an engine change.
Jean-Eric Vergne wasn't far off his team mate with 1m 26.157s, as Nico Hulkenberg failed to emulate team mate Perez in getting a Force India into Q3 and was 14th on 1m 26.279s, ahead of the Saubers of Adrian Sutil and Esteban Gutierrez on 1m 26.588s and 1m 26.692s respectively.
Rosberg set the initial pace in Q3 with 1m 24.552s, just below Hamilton's best from Q2, but the Briton demolished that with 1m 24.109s and set up what seemed like a great climax to the session. Rosberg duly improved to 1m 24.383s, but that was insufficient to unseat Hamilton, even though his own second run was only good for 1m 24.637s.
Behind them, Bottas didn't improve on 1m 24.697s as Massa put the second Williams fourth with 1m 24.865s.
Magnussen jumped Button as they annexed the third row with 1m 25.314s and 1m 25.379s respectively, while Ferrari's practice speed ebbed away as Fernando Alonso couldn't better 1m 25.430s for seventh.
Sebastian Vettel and Daniel Ricciardo could only manage 1m 25.436s and 1m 25.709s respectively for Red Bull, with Perez rounding out the top ten for Force India on 1m 25.944s.
Thus, with Kvyat's penalty the provisional grid will line up: Hamilton, Rosberg; Bottas, Massa; Magnussen, Button; Alonso, Vettel; Ricciardo, Perez; Raikkonen, Vergne; Hulkenberg, Sutil; Gutierrez, Maldonado; Grosjean, Kobayashi; Bianchi, Chilton; Kvyat, Ericsson.
Ericsson will start from the pit lane after being penalised for failing to slow down for double waved yellow flags during FP3 - an offence that also earned him three penalty points.