Windows of the parliament building were shattered and at least 19 people were, wounded, with a plume of black smoke across Kabul.
Four women were among the 19 wounded, said Sayed Kabir Amiri, a health official who coordinates Kabul hospitals.
According to Reuters, TV pictures showed legislators calmly leaving the building which was engulfed with dust and smoke.
The attack in the capital came as a second district in two days fell to the Islamist group in the north of the country.
Violence has spiralled in Afghanistan since the departure of most foreign forces at the end of last year as the insurgents push to take territory more than 13 years after the U.S.-led military intervention that toppled the Taliban from power.
A series of Taliban gains, and Monday’s attack on the symbolic centre of power, have raised questions about the NATO-trained Afghan security forces’ ability to cope.
“We have launched an attack on parliament as there was an important gathering to introduce the country’s defence minister,” said Taliban spokesman Zabihullah Mujahid.
The Taliban captured Dasht-e-Archi district a day after hundreds of militants fought their way to the centre of the adjacent district of Chardara.
“The Taliban managed to take it over this morning as the area has been surrounded for days,” Nasruddin Saeedi, the district governor who escaped to the provincial capital, Kunduz city, told Reuters by telephone.
Monday’s heavy fighting was just three km (two miles) from the governor’s compound