Button beat reigning world champion Sebastian Vettel of Red Bull by 2.1 seconds after the race turned into a 17-lap shootout after Vitaly Petrov stopped on the main straight, bringing out the safety car.
Pole-sitter Lewis Hamilton of McLaren was third, just ahead of local hope Mark Webber of Red Bull.
With a strong performance, McLaren showed it had closed the gap on the Red Bull team which dominated 2011, and set the stage for a more competitive season.
"It was an amazing day," Button said. "Starting the year strong for this team is really important. The past two years for us have been tricky for us coming into the first race. It points us in a great position for the next few races and on the right foot."
Fernando Alonso of Ferrari was fifth, with Williams' Pastor Maldonado crashing hard into a wall on the final lap while on the tail of the Spaniard.
Sauber's Kamui Kobayashi overtook Maldonado for sixth, and teammate Sergio Perez was eighth after starting 22nd, last on the grid. They were separated by Lotus' Kimi Raikkonen.
Toro Rosso's Australian driver Daniel Ricciardo finished ninth, and registered points in his first home race, by overtaking teammate Jean-Eric Vergne on the final sequence of corners. Vergne was shuffled to 11th, with Force India's Paul di Resta taking the last points-paying position in 10th.
Button got off the line better than Hamilton and immediately took the lead, which eventually grew to 11.8 seconds on lap 23 of 58. That lead was negated when Petrov stopped on the main straight.
"The biggest problem was the safety car. As soon as the safety car comes out and its six o'clock in the evening, its difficult to keep temperature in the tires," Button said. "I was a little on edge, but I was able to keep the heat in the tires."
Button mastered the restart, opening a 3.5-second lead on Vettel after just one lap and comfortably holding on for victory.
Vettel leapfrogged Hamilton thanks to a clever piece of Red Bull strategy, holding off on a pit stop as Hamilton went in, and taking over second behind the safety car. The German was tacked onto the back of Button, and it appeared he could pull off a victory that had seemed McLaren's for the taking.
"I thought I would be in a good position to have a shot at Jenson but I didn't," Vettel said. "He was too quick — two corners and he was gone."
"There was no way we could have stayed with him — he completely deserved to win today."
A downcast Hamilton saw little to be enthused about with his finish.
"It was a bit of a tough day, but there's plenty more races to do so I just have to keep my head up," he said. "It was still a positive to come here with good pace and hopefully we can take that on to the next race."
Lotus' Romain Grosjean started a surprise third, but was shuffled back quickly after a poor start and by lap three he was gone after breaking his right front axle bumping wheels with Maldonado.
Mercedes' Michael Schumacher was third for the first nine laps but ran wide over the grass at turn one under pressure from Vettel, and soon after retired with a gear problem.
"We've never had an issue with the gearbox all winter long, so it's a bit strange," the seven-time world champion said. "But they're prototype cars, you can never have total reliability."