Up to 10 gunmen attacked a guard post and entered the Badaber air base in outskirts of the city, Major General Asim Bajwa said on Twitter.
Bajwa said terrorists attacked the guard room at the camp early in the morning.
"Terrorists attk guard room early morning. Quick reaction force reached, surrounded, isolated them," he tweeted.
Six militants have been killed in an exchange of fire with security forces. A senior officer of Quick Response Force was injured in the attack.
No group has claimed responsibility for the attack so far.
Peshawar has frequently been targeted by militants. Last December more than 150 people were killed when Taliban gunmen attacked an army-run school.