Hamilton struck early in Q3 with a superb lap of 1:36.219, with Button's second run lifting him into second, 0.149 seconds adrift.
Button's run denied Michael Schumacher a place on the front row, but third was still the German's best qualifying display since he returned to the sport with Mercedes.
Mark Webber finished the better of the Red Bulls in fourth, with Sebastian Vettel one place behind him after Kimi Raikkonen's five-place penalty for changing gearbox yesterday was factored into the results.
Vettel opted for hard tyres where the rest of the front-runners will start the race on medium tyres, giving the defending champion a chance to employ a different strategy on race day to those around him.
Raikkonen's Lotus team-mate Romain Grosjean was promoted into sixth place, with Nico Rosberg a disappointing seventh after an error-strewn lap in Q3. Fernando Alonso dragged his Ferrari into eighth, while Sergio Perez rounded out the top 10.
Hamilton's McLaren had set the pace on Friday, but he was quiet in practice earlier in the day, and though he negotiated the first two rounds of qualifying with ease, he did not give away too much about his pace.
With his first lap of the final round, however, he set a blistering time which the rest of the field, one by one, tried but could not match.
There was good news for HRT in the first round of qualifying, who managed to qualify both cars for the race after missing out in Australia.
Toro Rosso rookie Jean-Eric Vergne was the driver to miss out on Q2 along with the HRTs, Marussias and Caterhams.
Felipe Massa limped through the session and it was no surprise when he failed to reach the top 10 shoot-out, ultimately having to settle for 12th place on the grid. Both Williams and the Force India duo bowed out, as well as the Sauber of Kamui Kobayashi and Daniel Ricciardo in a round where top and bottom-placed driver were separated by less than two seconds.
Mercedes and Lotus both showed their pace ahead of the final shootout, but it was McLaren who stole the show when it mattered, and their drivers will be strong favourites for the race in Sepang.