The officer Shamshad Begum, targeted in the pre-dawn attack in Tootkas town, in the district of Hangu, had been receiving Taliban death threats for some time, senior administration official Khalid Khan told AFP.
The area borders the deeply conservative tribal region of Kurram, he said.
Police official Fazal Hussain said about a dozen militants armed with rockets, handgrenades and assault rifles raided the house at 3:30am (22:30GMT), first launching a rocket before barging into the house and opening fire.
Begum was killed along with her two sons and one daughter, and two sisters of her husband. Two other sons and one daughter were wounded in the attack.
The Taliban are engaged in a campaign of violence against security forces in Pakistan, a key ally in the US-led "war against terror", and had recently sent Begum letters warning her to quit her job.
The militants entrenched in the tribal region on the Afghan border oppose jobs and education for women.