Sebastian Vettel was ninth as team-mate Mark Webber was disqualified for stopping on track with too little fuel.
Chinese GP: Watch Lewis Hamilton's maiden pole position for Mercedes
The Australian will be thrown to the back of the grid, but has the choice of changing his set-up to enhance his chances of overtaking and starting from the pit lane, as his Red Bull team-mate Vettel did in the same circumstances in Abu Dhabi last November.
The rules dictate that any car that does not make it to the pits has to have enough fuel in it to provide a one-litre sample as well as the amount of fuel required to get it back to the pits from where it stopped.
Webber's had only 150ml left in it when it stopped with what Red Bull initially said was a fuel-pressure problem.
Red Bull said a problem with the fuel bowser, the machine that is used to pump fuel into the car, "caused an incorrect fuel measurement to be delivered to Mark's car".
Webber described the situation as "very disappointing".
Lotus driver Romain Grosjean was sixth ahead of the impressive Daniel Ricciardo's Toro Rosso and McLaren's Jenson Button, who like Vettel used 'medium' tyres in final qualifying in an attempt to gain an advantage in the race.
The drivers ahead of Button and Vettel will all have to pit relatively early to change the fragile 'soft' tyres while the 'mediums' will last around 20 laps.
But Vettel and Button will have to use the 'softs' later in the race.
"Obviously we are on a different strategy," Vettel said. "We will see whether it works tomorrow. But I am confident we did the right thing."
Mercedes team principal Ross Brawn said: "Those on the option will have to stop relatively early. It will be a fascinating race."
Chinese GP: Mark Webber has fuel problem in qualifying
Hamilton's performance underlined the pace Mercedes had shown throughout the weekend and he was an impressive 0.377secs quicker than Rosberg, who made a mistake at the final corner.
Hamilton said: "[It's an] incredible feeling, so happy to have our first pole for some time. Ecstatic, the lap was great. I really hope we can carry that into tomorrow.
Raikkonen said: "The gap is quite big still. We don't have that speed right now, we were second. Not too bad. The best I think I have been with the team. We are missing the downforce in the middle sector a bit. [We'll] see what we can do."
Alonso added: "Very happy. The weekend has been very good for us. The car felt competitive from Friday.
"The car is responding well and I think we have a good set-up for the race and if everything goes well we should be able to fight for the podium with both cars which is good for the team."
Saturday, 13 April: Qualifying highlights: 13:00-14:15, BBC One/BBC HD.
Chinese Grand Prix, day three
Sunday, 14 April: Race live: 07:00-10:15 BST, BBC One/Red Button, BBC Radio 5 live from 07:45 BST and live text commentary online. Race replay: 14:00-16:00 BST, BBC One/BBC Red Button, Race highlights: 19:00-20:00 BST, BBC Three.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.