The children were aged between five and ten while the headmaster was a member of the Awami National Party(ANP), police added.
"The principal of the private school was killed and eight children were wounded when unknown gunmen fired at school gate and threw a grenade inside the school," senior police official Imran Shaukat told AFP.
The gunmen fled on motorbikes and nobody has claimed responsibility for the attack, Shaukat said, adding that police have started an investigation.