The insurgents tried to storm the complex after triggering a car bomb but were repelled and have taken position in a partially-constructed building nearby, officials said of the ongoing attack.
All Members of Parliament were safely evacuated after the attack, which came as the Afghan president's nominee for the crucial post of defence minister was to be introduced in parliament.
The assault on such a high-profile target in downtown Kabul raises fresh questions about security as Afghan forces battle a resurgent Taliban for the first time without the aid of NATO forces, who ended their combat mission in December.
"Afghan special forces are fighting them now. All the MPs have been safely evacuated."
More From This Section
MP Mohammad Reza Khoshak, who was in the chamber at the time, described the moment the blast struck.
"The session was on and we were waiting for defence minister nominee... Suddenly we heard a loud explosion, followed by several other smaller explosions," he told AFP.
"In a few seconds the hall was filled with smoke and MPs began fleeing the building. The militants are still firing at the building and clashing with security forces."
The militants recently rebuffed requests from senior Afghan clerics to halt attacks during the fasting month of Ramadan even as a surge in violence has sent civilian casualties soaring.
A group of suicide attackers last tried to storm parliament in 2012 as they launched coordinated attacks in several parts of the capital, including several diplomatic enclaves.
The Taliban, toppled from power in the 2001 US invasion of Afghanistan, swiftly claimed responsibility for the latest attack.
Police denied that Taliban fighters had breached the high-security complex.