"Around 10:10 am, a group of armed attackers entered an under-construction building in (the) NDS training centre in (the) Afshar area of Kabul," interior ministry spokesman Najib Danish told AFP, referring to the National Directorate of Security, Afghanistan's spy agency.
"The fighting is ongoing and we have also launched our operation."
There were no immediate reports of any casualties.
Nasrat Rahim, a deputy interior ministry spokesman, said the sound of large and small arms fire could be heard from the fighting.
Roads to the area were closed and dozens of police and intelligence officers were blocking access to the public.
No group has claimed responsibility for the attack yet.
The Afghan capital has become one of the deadliest places in the war-torn country for civilians in recent months, as the resurgent Taliban and increasingly the ISIS group both step up their attacks.
Security in Kabul has been ramped up since May 31 when a massive truck bomb ripped through the city's diplomatic quarter, killing about 150 and wounding around 400 people, mostly civilians.
Monday's attack represents another blow to beleaguered Afghan forces.
The Taliban have targeted military installations in recent months, including a spate of attacks in October that killed around 150 people.
Afghan forces, already beset by desertions and corruption, have seen casualties soar to what a US watchdog has described as "shockingly high" levels since NATO forces officially ended their combat mission in 2014.
Morale has been further eroded by long-running fears that the terrorists have insider help -- everything from infiltrators in the ranks to corrupt Afghan forces selling equipment to the Taliban.
But the ISIS, which has expanded its presence in Afghanistan since it first appeared in region in 2015, has also dramatically scaled up its attacks in Kabul, including on the country's Shiite minority.
In November, a suicide attacker blew himself up outside a political gathering in Kabul, killing at least 14 people in an attack claimed by ISIS.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.