The attack took place in the morning with a suicide bomb using an explosives-laden truck, local police spokesman Hazrat Hussain Mashriqiwal told CNN.
An additional six gunmen with hand grenades stormed the provincial headquarters of the national directorate of security in Nangarhar province. The gunmen and Afghan troops fought for hours.
The six gunmen were killed, Mashriqiwal said.
Forty-five people were injured by broken windows and collapsed ceilings as a result of the explosion.
The Taliban claimed responsibility for the attack.