A police statement said there were no national security concerns, which means the man is not considered to be a terrorist.
Police and security guards began negotiating with the man on a lawn near the ministers' wing of Parliament House on Thursday afternoon after he was seen to be armed, the statement said.
Officers cordoned off a section of the road that circles the building. An ambulance reached the scene as officers shocked the man on the lawn half an hour after the standoff began.
He was taken into custody. A police spokesman declined to provide further details.
Prime Minister Tony Abbott was not in the capital today and Parliament was in recess.
Parliament House has been identified as a major terrorist target and security was stepped up weeks before a gunman in Ottawa fatally shot a soldier as he stood as a ceremonial guard then stormed Canada's Parliament. Canadian Prime Minister Stephen Harper called the shooting a terrorist attack.
