Musharraf was speaking as he left on a visit to Indonesia and Malaysia.
Shia Muslims around the world have been carrying out ceremonies to commemorate Ashura, which marks the anniversary of the death of Imam Hussein, a grandson of the Prophet Muhammad.
Khalid Khan, a Pakistani police officer, said: "Unknown attackers fired a few mortar rounds that landed near the Shiite procession [in Hangu] and then there was an exchange of firing".
Police officals said the two people killed were Afghan refugees.
A senior interior ministry official said the Hangu curfew had been imposed to ease tensions, where 40 people died in an attack on a Shia procession last year.
"There is lot of tension between the rival communities in Hangu and curfew has been imposed for an indefinite period in order to maintain law and order," he said.
Elsewhere, the roof of a building collapsed in a village near the eastern city of Lahore injuring 48 people who had been watching a procession in the street below, police said.
Two suspected Sunni fighters were killed last week in the town, which is close to the troubled Waziristan tribal region, when their car which was carrying explosives, blew up.
In other attacks 15 people were killed and 30 wounded in a suicide attack on a Shia procession in Peshawar at the weekend.
Another three people died in a suicide blast at a Dera Ismail Khan police checkpost on Monday.
Shia make up about 15 per cent of the mostly Sunni Muslim country's population.