The Royal Canadian Mounted Police said the shootings occurred in the small coastal town of Portapique, about 130km north of the provincial capital Halifax.
“Gabriel Wortman, suspect in active shooter investigation, is now in custody,” the force said in a tweet. It gave no details and did not say whether the victims were injured or killed.
Police initially said Wortman was driving what appeared to be a police car and was wearing a police uniform but later reported he was at the wheel of a Chevrolet sports utility vehicle in Milford, about 80km further south.
Mass shootings are relatively rare in Canada, which has tighter gun control laws than the United States.
In August 2018, a man in the neighbouring province of New Brunswick shot dead four people, including two police officers, in an apartment complex.