The Englishman led a dramatic race throughout, driving with composure as the field fell apart around him.
He survived four interventions by the safety car to head Nick Heidfeld of BMW Sauber and Williams's Alexander Wurz.
World champion Fernando Alonso finished seventh and Robert Kubica survived a huge crash after rolling his BMW.
The Pole's 180mph crash at the hairpin prompted the second, and most lengthy of the safety car periods, but by that time all semblance of a challenge to Hamilton had evaporated.
His victory puts him into an eight-point championship lead over Alonso and strengthens the astonshing prospect of him winning the title in his first season.
Lewis has done a great job, he deserved it. I am happy for him
McLaren team boss.
The 22-year-old started from pole position, and was expecting a strong challenge from team-mate Alonso.
But the Spaniard ran wide at the first corner, and slipped down to third place behind Heidfeld. He was then taken completely out of contention through no fault of his own.
The first caution period was triggered by a crash involving Adrian Sutil's Spyker, and, running low on fuel, Alonso had no choice but to make his first pit stop at the same time, breaking rules that say drivers cannot pit until the field has formed up behind the safety car.
That meant Alonso was handed a 10-second stop-go penalty, dropping him down to 13th place.
He started lapping at record pace in an attempt to make up places, and was aided in his quest by three further safety car periods - the second for Kubica's horrendous crash.
Alonso had an eventful race and eventually finished seventh
The Pole's car appeared to touch Jarno Trulli's Toyota as they approached the hairpin and speared off the track. The car was launched into the air, flew into the barriers and barrell-rolled down the track before coming to rest on its side.
Medical crews took several minutes to get him out of the car, and he was taken to Montreal hospital for further checks, but his manager Danieli Morelli said he was "fine".
The constant safety car interventions might have unsettled some drivers, but Hamilton demonstrated the coolness and maturity that have been his signature in his stunning debut season to continue unflustered at the front.
McLaren boss Ron Dennis, who has overseen Hamilton's career for the past decade, said: "He has done a great job, he deserved it. I am happy for him.
"I am disappointed that the saftey car was deployed when we needed fuel. It really destroyed Fernando's race.
"We are here to do well with both cars but nothing can take away from Lewis's first and fantastic victory."
And by the end of the final caution period, Wurz was in an unaccustomed third place thanks to his team's decision to fill his car up with fuel at his first pit stop and gamble on more safety car interventions allowing him to get to the end of the race without stopping again.
Renault's Heikki Kovalainen was another beneficiary, taking an impressive fourth place after crashing in qualifying and starting from the back.
Other drivers were less fortunate - Ferrari's Felipe Massa and Renault's Giancarlo Fisichella were both disqualified for leaving the pits when the exit was closed.
Kimi Raikkonen was fifth for Ferrari, ahead of Takuma Sato's Super Aguri, which emphasised the sense of surrealism hanging over the race by passing Alonso for sixth place with two laps to go.
The Spaniard had fought up on to Raikkonen's tail before the final safety car intervention and looked as if he might take the Ferrari before the end.
Instead, he began to drop back, struggling for grip, and fell into the clutches of Sato, who dived around the outside in the final corner. Alonso gave him room, preferring not to risk a collision.
Ralf Schumacher took the final point in eighth place.
may the force be with you