At least three people were killed in an initial attack from a car bomb outside the building, the city's criminal investigations chief told the AFP news agency.
But a fresh explosion from a suicide bomber inside the building took the death toll to at least eight. Most of the dead are thought to be police.
Insurgents holed themselves up inside the compound and exchanged fire with Afghan and Nato security forces for more than four hours after the first blast.
"Eight people, mostly police, are killed and 10 others injured," Siddiq Siddiqui of Afghanistan's interior ministry said.
"There is one person, one of the attackers who is still alive and resisting. The area has not yet been cleared."
The Times' Kabul correspondent Jerome Starkey told Sky News gun battles continued after the blasts amid the bombed offices. Read More