In Kandahar province, at least 10 civilians, including eight women, were killed Tuesday when a roadside bomb hit their vehicle, the BBC said.
Officials said three security guards and four militants died in the Kabul attack the Taliban said they carried out.
Afghan President Hamid Karzai was at the palace, but officials said the target seems to have been the nearby Ariana Hotel, home to a CIA station.
One of the most heavily guarded areas of Kabul, the area includes buildings such as the Defense Ministry and NATO headquarters, the BBC said.
The militants initially targeted the palace's eastern gate where media gathered for a news conference with Karzai.
Four attackers wearing uniforms and carrying fake identification began the attack, with one blowing himself up, a Defense Ministry official told the BBC. The militants eventually were killed by private security forces attached to the hotel.
Police say the attack was brought to an end just less than 2 hours after the first shots were fired.
The BBC quoted Taliban spokesman Zabihullah Mujahid as saying in a text message: "A number of martyrs attacked the presidential palace, defense ministry and the Ariana Hotel."
U.S. Ambassador James B. Cunningham, in a statement, condemned the attack, calling on the Taliban to end the violence and "come to the table to talk to the Afghanistan government about peace and reconciliation."
International Security Assistance Force spokesman Will Griffin said the situation was being monitored.
"We've heard reports of explosions and small arms fire," Griffin said in a statement during the attack. "We're taking necessary measures to ensure the safety of ISAF personnel and ISAF partners."
Tweets from the official ISAF Twitter page captured the seriousness of events.
"CAMP LOCKDOWN at ISAF HQ: SHELTER IN PLACE," one post said. The other read: "DUCK and COVER alarmed at @USEmbassyKabul."
The Afghan Taliban last week announced they had opened an office in Qatar for peace talks. Karzai strongly objected to the Taliban office, saying the Taliban flag and nameplate initially erected at the facility indicated the Taliban were trying to portray themselves as a government-in-exile.
Officials say the Afghan government's High Peace Council, set up to lead peace efforts, would not participate in peace negotiations unless the process was Afghan-led.
Afghan security forces last week took responsibility for the country's security from NATO's ISAF as the coalition forces prepare to end their combat operations next year.
Wisconsin business offering 'therapeutic cuddling' forced to close
Couple calls 9-1-1 over missing hash browns; assault McDonanld's employees