Officers said the bus driver and a teacher were also killed in the attack, which started with a rocket being fired.
Sahibzada Sajjad, deputy superintendent of police in Peshawar, said occupants of the bus were shot after the rocket failed to hit.
Five other children were wounded.
It happened in Matani, close to the main city of Peshawar, which is often targeted by Taliban militants close to al Qaeda.
Militants have attacked civilians in the area in the past to punish residents for not supporting them.
Police officer Qayum Khan said the bus was taking children home when the gunmen struck earlier on Tuesday.