Quebec City police Chief Robert Pigeon said during a news conference Sunday morning that the suspect is from the suburbs north of Montreal and came to the capital "with the intention of doing the most damage possible."
Pigeon said that "everything leads us to believe he chose his victims at random," adding that he believes the crime was premeditated.
He said that the suspect, whose name has not been released, is not associated with any terror group, according to the investigation.
The man was carrying a Japanese Katana-style sword, Pigeon said.
The police chief said the suspect does not have a criminal record, but he did reveal five years ago in a "medical context" that he wanted to commit a violent act.
Pigeon said police currently have no reason to believe the attack was motivated by religious or political reasons.
The suspect was initially taken to hospital for evaluation. He is currently being questioned by homicide investigators and has not yet appeared in court