The retirement means Hamilton will almost certainly not be able to catch Alonso in the remaining six races, barring some bad luck for the Spaniard, and it remains to be seen whether the latest in a series of disappointments this season has an effect on his future career choice.
Vettel's pace following Hamilton's exit suggested the McLaren might have been holding up the Red Bull slightly but Hamilton was in control of the race until his car lost drive on lap 23 coming out of the first chicane.
He had known for about a minute that there was an impending problem.
"It's one of the toughest races all year," said Vettel. "It's very long, we did the full two hours, the circuit is a killer, there are many bumps and there is no room for error.
"Obviously I benefited from Lewis's failure, which I could see for a couple of laps. I'm very happy, it's such a tough race and very proud to win it.
"I'd like to dedicate it to Sid Watkins. He will be remembered [as] one of the main reasons we can go out on a circuit like this and be reasonably safe.
"It's an incredible weekend for all of us. We have a lot of races left, we just have to use the momentum and keep pushing."
That left Vettel in front from Button, Williams's Pastor Maldonado and Alonso but they raced only until lap 33, when a crash by Narain Karthikeyan's HRT brought out the safety car.
Vettel reacts to Singapore success
Maldonado dropped down the order after pitting to change tyres, even though he had made his second pit stop only four laps earlier at the same time as Alonso.
The Venezuelan, who had qualified second, retired before the race was restarted with a hydraulics problem.
The re-start came on lap 39, but the cars raced for only half a lap before Michael Schumacher smashed into the back of Toro Rosso's Jean-Eric Vergne, who was battling with Sauber's Sergio Perez.
The race was restarted again on lap 42, when it was already clear it would reach the two-hour time limit before the full 61 laps were complete. In the end it was stopped two short of full distance.
Vettel and Button exchanged fastest laps for a while before Vettel began to open the gap and establish a comfortable lead. He was eight seconds ahead before backing off on the final lap.
Behind them, Alonso measured his pace to ensure his tyres would last to the end - they were four laps older than those on the Force India of Paul di Resta behind him.
Did you know?
Fernando Alonso has a strong record in Singapore, finishing on the podium in four of the five races held.
The Scot took an impressive fourth place after a strong qualifying saw him start sixth, ahead of Mercedes driver Nico Rosberg and Lotus's Kimi Raikkonen.
The second Lotus of Romain Grosjean was seventh, ahead of Ferrari's Felipe Massa, Toro Rosso's Daniel Ricciardo and Red Bull's Mark Webber.
After the race, Webber was given a drive-through penalty for passing Kamui Kobayashi off the track around the outside of Turn Seven on lap 50. Twenty seconds were added to his race time which dropped him down to 11th and promoted Perez to 10th.
The closing stages of the grand prix were enlivened by some exciting racing as closely-packed drivers battled for position.
Massa might have helped secure his Ferrari future with a strong drive, including an improvisational pass on Williams's Senna into Turn 13. The Brazilian was last at the end of the first lap after picking up a puncture.
And both Sauber drivers lost their front wings in separate incidents with Force India's Nico Hulkenberg.
Vettel was investigated after the race for an incident at the first safety-car re-start in which he slowed unexpectedly and Button nearly hit him from behind, but after a lengthy deliberation the stewards decided to take no action.
Singapore Grand Prix 2012, day three
Sunday, 23 September: Highlights on BBC Three at 19:00 BST.
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.