It followed a protest over the same issue in the northern city of Mazar-i Sharif on Friday left 14 people dead, including seven UN workers.
It was the worst attack on the UN mission in Afghanistan since the international invasion in 2001.
Separately, three insurgents were killed when they attacked a Nato base.
They were stopped before they could enter the compound, Nato and Afghan police said.
At least one was wearing a burqa, news agencies reported on Saturday, quoting police sources.
Hundreds of people joined the demonstrations in Kandahar on Saturday. Gunfire was heard in Kandahar and plumes of smoke rose from cars that had been set on fire.
Hospital officials told the BBC 15 people had been injured. A BBC correspondent in Kandahar says the city is under lockdown.
UN Secretary General Ban Ki-moon condemned the violence in Mazar-i Sharif as "outrageous and cowardly". Afghan President Hamid Karzai said it was inhumane and against Islamic and Afghan values.
The Taliban has denied it carried out the attack.
"The Taliban had nothing to do with this, it was a pure act of responsible Muslims," spokesman Zabihullah Mujahid told the Reuters news agency by phone from an undisclosed location.
"The foreigners brought the wrath of the Afghans on themselves by burning the Koran," he said.
Local police told the BBC that 27 people had been arrested following the demonstration in Mazar-i Sharif.
The demonstrators were angered by the actions of US Pastor Wayne Sapp, who set light to a copy of the Koran at a church in Florida on 20 March.
The burning took place under the supervision of Pastor Jones, who last year drew condemnation over his aborted plan to burn copies of the Koran on the anniversary of the 9/11 attacks.
Pastor Jones has denied responsibility for the lethal protests in Afghanistan.
Witnesses said the protest began peacefully but suddenly turned violent.
Several demonstrators were killed by guards, who were then overpowered by the mob.
A state of emergency has now been declared in the city, Afghan intelligence sources told the BBC. All roads in and out of Mazar have been blocked and cars are being checked, says the BBC's Bilal Sarwary.
Dan McNorton, spokesman for the UN mission in Afghanistan, said: "Three international Unama (United Nations Assistance Mission in Afghanistan) staff members were killed, and four international armed security guards were killed."
One of the dead was a Swedish national, while another came from Norway. The other foreign victims are believed to be a Romanian and four Nepalese guards.
US President Barack Obama condemned the attack "in the strongest possible terms", saying the work of the UN "is essential to building a stronger Afghanistan".
The top UN representative in Afghanistan, Staffan De Mistura, has flown to the area to handle the matter.
Witnesses said a crowd of several hundred staged a protest outside the Blue Mosque in the city after Friday prayers.
The crowds moved to outside the UN compound, where a small group broke away.
Munir Ahmad Farhad, a spokesman for Balkh province, said the group seized weapons from the guards and opened fire before storming the building.
Local police spokesman Lal Mohammad Ahmadzai told reporters that two of the UN staff had been beheaded.
However, police Gen Abdul Rafu Taj said that "according to the initial reports... none were beheaded". He said they were shot in the head.
Kieran Dwyer, director of communications for the UN mission in Afghanistan, said the UN workers had been trapped inside the compound and "hunted down" in what was an "overwhelming situation".
"These are civilian people, unarmed, here to do human rights work, to work for peace in Afghanistan - they were not prepared for this situation," he told the BBC.
Mr Dwyer said it was too early to tell how the attack happened or why the UN was targeted, but that the organisation would now take extra security measures.
But he added: "The UN is here to stay. We're here to work with the people to help them achieve peace, and this sort of thing just highlights how important that is."
Protests were held in several other Afghan cities on Friday which demonstrators in Herat had called a "day of anger", Afghanistan's Noor TV channel reports.