"These weapons were designed for one purpose and one purpose only: to kill the largest number of people in the shortest amount of time. There is no use and no place for such weapons in Canada," Trudeau said in a briefing where he announced the decision.
The ban is effective immediately and includes 1,500 models of military-style assault weapons.
"It is no longer permitted to buy, sell, transport, import or use military-grade assault weapons in this country," he said.
There will be a two-year amnesty period for law-abiding gun owners and the prime minister said "fair compensation" would be given.
Trudeau spoke about the issue on Thursday, but only said a decision would be made in the coming days.
"We have long committed to strengthening gun control in this country, including banning military-style assault weapons," he said. "There is no need in Canada for guns designed to kill the largest amount of people, in the shortest amount of time."
He said measures to strengthen gun control were ready to go before parliament was suspended on March 13 due to the COVID-19 pandemic.
"[It's] something on which there is a large consensus by Canadians who want to see less violence and fewer deaths from gun violence in this country," Trudeau said.
The announcement comes nearly two weeks after the deadliest shooting rampage in Canadian history.
On April 18 and 19, at least 22 people were killed in a mass shooting in Nova Scotia. Canadian law enforcement officials said 51-year-old Gabriel Wortman allegedly targeted his former partner during the killing spree, which took place at six sites and destroyed several properties. Investigators said some of the other victims, including Royal Canadian Mounted Police Constable Heidi Stevenson, were randomly killed.
Last year New Zealand banned all military-style semi-automatic weapons and assault rifles after a deadly shooting killed more than 50.
ABC News' Christine Theodorou contributed to this report.