The 28-year-old Briton clocked a fastest lap of one minute, 29.398 seconds in his Mercedes-GP to outpace world championship leader Sebastian Vettel.
It was Hamilton's third pole position of the season and the 29th of his career, pulling him level with Argentine legend Juan Manuel Fangio and defending triple world champion and current series leader Vettel in the record books.
Daniel Ricciardo, qualified sixth for Toro Rosso ahead of the two Ferraris of Brazilian Felipe Massa and Spaniard Fernando Alonso - the Italian team having changed strategy to run on medium-hard tyres in the third qualifying session.
Both Button and Hulkenberg chose not to clock a time in the session as they, like the Ferrari men, opted to go for race strategy instead of grid positions.
"It's really overwhelming," Hamilton said. "I've been struggling since the first run in P1. It was pretty good, but P2 and P3 were disasters and it got worse this morning.
"I wasn't comfortable with the car at all.
"We went back to the truck, tried to analyse everything and made lots of changes and hoped it would work. Fortunately the car was beneath me and I was able to put in the times.
"I'm grateful to the guys and all the hard work they put in. It's a privilege to drive for this team, they've got great history and this is where Mercedes really started. I'm proud to get pole, but there are no points for today.
"These guys [Red Bull] are good on the long runs. I hope, with my new set-up, that the pace will be as good and we can given them a run for their money."
It was not a perfect day for Mercedes though as a misjudgement in the second part of qualifying ensured that Rosberg will start 11th, his worst starting position of the season.
Mercedes had believed Rosberg had set a time quick enough to put in the top-10 shoot-out, but a number of rivals found pace on their lap of the session, with Raikkonen being the man whose lap ended Rosberg's pole ambitions.
Follow us @SprtNationalUAE