The suspected fighters from the ousted Taliban group ambushed the police chief of Kabul's Musayi district as he was on patrol late Friday, interior ministry spokesman Lutfullah Mashal confirmed.
It is believed to be the first time a senior police official has been killed in Kabul since the hardline Islamic Taliban movement was overthrown by US forces and Afghan militiamen in late 2001.
"Musayi police chief and two policemen were killed and two other police were wounded last night after they were ambushed by enemies of peace," Mashal said.
Afghan officials commonly use this term to refer to Taliban militants.
Police surrounded the area but the attackers managed to flee the site, which is in Kabul's suburbs around 10 kilometres (six miles) from the city centre.
Violence and attacks on parliamentary candidates increased in the build-up to the elections.
On Friday, Abdul Hadi, a candidate from Hazarjoft in the southern province of Helmand, was killed by suspected Taliban fighters.
"It is the work of the enemies of Afghanistan," Mohammed Wali said.
Also on Friday, the US military disclosed that a roadside bomb had killed an Afghan interpreter and wounded two US soldiers during a security patrol for this weekend's milestone parliamentary polls.