Television footage showed soldiers entering the campus as ambulances lined up outside the main gate and anxious parents consoled each other.
Shabir Khan, a lecturer in the English department, said he was about to leave his university housing for the department when firing began.
"Most of the students and staff were in classes when the firing began," Khan said. "I have no idea about what's going on but I heard one security official talking on the phone to someone and said many people had been killed and injured."
Pakistan, which has suffered from years of jihadist militant violence, has killed and arrested hundreds of suspected militants under a major crackdown launched after the massacre of school children in December 2014 in Peshawar.
The school attack by six Pakistani Taliban gunmen hit a raw nerve in Pakistan and was seen as having hardened Pakistan's resolve to fight militants along its lawless border with Afghanistan.
"We are determined and resolved in our commitment to wipe out the menace of terrorism from our homeland," Prime Minister Nawaz Sharif said in a statement after Wednesday's attack.