The attack in Jalalabad, about 120 kilometers (75 miles) east of Kabul, came on the second day of U.S. Secretary of State John Kerry's visit to the Afghan capital.
First, an insurgent in an explosives-laden car detonated his vehicle in front of the Jalalabad Police Quick Reaction Force. Then, seven other attackers wearing vests rigged with explosives stormed the compound, police said.
Three attackers blew themselves up inside the complex while police shot the remaining four during a gunfight that lasted more than an hour.
Some of the attackers wore uniforms resembling those worn by the U.S.-led NATO coalition, said police chief Mohammad Sharif Amin in Nangarhar province, where Jalalabad is the capital.
Taliban spokesman Zabiullah Mujahid claimed responsibility for the attack.
In other violence, a roadside bomb killed two police officers and wounded another in the Nad Ali district of southern Helmand province, the governor's office there said.
Afghan insurgents have in recent months been carrying out complex attacks involving car bombs and gunmen with explosives-laden vests against government and police buildings around the country.
The attacks are expected to intensify as the traditional spring fighting season gets under way. Heavy snow and bad weather conditions usually put a damper on fighting during the harsh Afghan winter.
On March 14, Afghan intelligence service seized a massive truck bomb packed with eight tons of explosives on the eastern outskirts of Kabul. They also killed five suspected suicide bombers and arrested two others during a raid to seize the truck.
The truck was apparently meant to carry out an attack on a NATO facility in the capital. According to Afghan intelligence, the truck bomb bore the hallmarks of the Haqqani network, which is known for conducting spectacular attacks.
Affiliated with the Taliban, the network is run by the Haqqani family and is based across the border in Pakistan.