A woman was shot dead and 19 others students were wounded before the gunman was shot dead by police.
Montreal police director Yvan Delorme said there were no indications that the shooting, which took place at midday, was an act of terrorism or motivated by racism. He said the gunman acted alone.
The shooting spree took place at Dawson College, an English-language university preparatory school.
The incident paralysed downtown Montreal, as terrified students fled in droves and police blocked off streets, even closing a metro station that accesses the college.
Students terrified
The lone shooter, described as a 25-year-old Canadian, was armed with three weapons when police surrounded him inside the college and shot him dead.
Twenty people were hit by gunfire in the shooting spree, including a woman who died of her injuries at the school. Radio-Canada said the young woman was a 20 years old.
Medical sources said five of the wounded were in critical condition.
"We were in class. We heard gunshots, a couple of gunshots. We heard a bunch of girls yelling," student Daniel Harrosh, 17, said.
"I opened the door, I saw a bunch of people running, I closed it, then the teacher came. He locked the door and then said something major was going on in the other room. At a certain point, the lights went off. We heard several gunshots, a dozen maybe," Harrosh said.
Another witness, Michel Boyer, told CTV television that he "saw the gunman who was dressed in black and at that time he was shooting at people. It was probably one of the most frightening moments of my life."
Witnesses said the shooter had a Mohawk haircut and appeared to be armed with an AK-47 rifle. According to Radio-Canada, he was of Indian or Sri Lankan origin.
A commercial skyscraper and its retail center adjacent to the college were evacuated after gunfire was heard, according to television reports.
Hours after the shooting, groups of students still shocked by the incident sat near the police perimeter surrounding the campus, hugging each other for comfort.
Curious onlookers flocked to the site as helicopters circled above.
Student Roxanne Michaud, 19, locked herself into a classroom with four other students and two professors for two-and-a half hours when the shooting began.
"We listened to the radio and checked the Internet to find out what was happening," she said. "We couldn't call anyone because the portable telephones did not work."
Condolences from leaders
Canadian Prime Minister Stephen Harper described the incident as "a cowardly and senseless act of violence."
He added: "Our thoughts and prayers are with the injured and their loved ones, and to the students and staff of the college who are all victims of this terrible tragedy."
Montreal Mayor Gerald Tremblay described the incident as a "very unhappy event," but also one that was "isolated."
Quebec Premier Jean Charest said that the whole province was "distressed" by news, and expressed "deep sorrow for the victims, the families, (and) for the parents who have children studying at Dawson."
The shooting recalled the so-called Montreal Massacre on December 6, 1989, at Montreal's engineering school Ecole Polytechnique in which gunman, Marc Lepine, killed 14 female students before killing himself.
