A gunman shot a Canadian soldier at the National War Memorial in Ottawa before entering the nearby parliament building where further shots were fired.
A third shooting took place at a shopping mall in the city as police warned people in the area to stay away from windows and rooftops.
Video filmed from inside the parliament building shows officers rushing down a large marble hallway with handguns held in front of them, before the sound of gunfire and shouting rings out.
The footage becomes shaky as the cameraman, believed to be a local reporter, rushes for cover behind a pillar.
A spokesman for Prime Minister Stephen Harper said he was safe and had left the area.
Cabinet minister Tony Clement tweeted that at least 30 shots were fired during a meeting with Mr Harper and other MPs.
"I feared this day would come, and my prayers are with the fallen soldier," he added.
It was not clear how many people were behind the attack, with reports that one gunman had been shot dead by police.
People inside the parliament building scrambled down scaffolding to escape, witnesses said, while other areas were in lockdown.
The shootings come two days after a recent convert to Islam killed one Canadian soldier and injured another in a hit-and-run incident before being gunned down by police.
The soldier wounded in today's incident was taken away in an ambulance but his condition was not known.
Alain Merizier, a waiter in the parliament dining room, said he was on his way to work when he saw a gunman run from a car towards the parliament.
"I saw a car suddenly stop," he told the BBC. "There was only one man in the car. He went out of the left side.
"He had a long gun and he ran away to the front and went inside the parliament. I heard one shot. I saw an officer running after him."
Mr Merizier said the man had long dark hair and a small beard.
He said: "I was astonished more than frightened. I said 'What happened?'
"You don't have time to be afraid, you are just surprised."
Vancouver South MP Wai Young said it had been "a difficult day".
She said: "I am absolutely stunned because here in Canada we pride ourselves on being open, democratic and welcoming. To have this type of random terrorist attack happen in one of the safest places in Canada is quite shocking."