Ferrari ace Alonso turned in a faultless performance at the rain-delayed race but was pushed all the way by Sauber's Sergio Perez, who also put in an impressive drive to finish second.
Lewis Hamilton had to settle for third once again after starting on pole position, but it was a miserable day for his team-mate Jenson Button, who finished down in 14th place.
A shower five minutes before the start threw all the teams into a panic as the decision on whether to stick or twist with their tyre choice.
As the temperatures plummeted and the thunder and lightning gathered over the grid, McLaren's two drivers opted to stick with their intermediates.
It proved to be a lucky gamble, as Hamilton made a fantastic start after last weekend's disappointment in Australia where he surrendered his lead to Button.
WINNING SMILE ... Fernando Alonso show off his trophy in Malaysia
But while the two Brits went safely through, Michael Schumacher, who started the race in third, had a difficult time.
He quickly surrendered his position to Lotus' Romain Grosjean, who jumped up from sixth, but then on the exit Schumacher regained his position.
Grosjean managed to regain his composure but suffered more hard luck on the first lap. As the rain continued to hammer down, he was due to come into the pits to swap on to the wet tyres.
It was incredibly unfortunate for Grosjean, who had given another solid performance in qualifying.
As the conditions took another turn for the worst, Button decided to come in for the wets having seen Ferrari's Felipe Massa benefit from the new tyres.
Button complained on this team radio that circuit was becoming too dangerous and said: "The last sector is like a lake".
Two bolts of lightning and a rumble of thunder seemed to rattle the race stewards, who quickly sent out the safety car on lap eight.
But even under the safety car, the conditions were becoming too dangerous and at the end of lap nine the race was red flagged.
But it proved to be a nightmare restart for McLaren. First, Hamilton had a slow pitstop as the mechanic struggled with the rear jack.
He was then forced to wait behind Massa as Perez and Alonso took advantage.
There was even worse news for Button on lap 15 as he collided with the HRT of Narain Karthikeyan on turn nine and lost his front wing.
It was another slow pitstop from McLaren, which dropped the Australian GP winner down to 21st place.
While Button was struggling, Ferrari's Alonso was able to set about building his lead over Sauber's Perez.
The Mexican has been linked with replacing Massa at Ferrari at the end of the season and gave added weight to his reputation with a number of quick laps.
Button was clearly furious at seeing his chances of winning wiped out and he took out his frustration, as he started ruthlessly cutting his way through the pack.
He pulled a brilliant move on the beleaguered Massa before being granted his wish to switch to the medium compound slick tyres.
Perez continued to push Alonso to make for a thrilling final eight laps until he ran wide and gave his opponent more breathing space.
There was even more drama as reigning champion Sebastian Vettel suffered a puncture while he was in fourth place when he caught the front wing of Karthikeyan.
The subsequent pitstop and a KERS problem meant that he had to settle for 11th place.
VICTORY HUG ... Fernando Alonso celebrates with Ferrari team principal Stefano Domenicali