Professor Syed Hamid Husain of the university was also among the dead who had published seven research papers and was considered an expert in organic chemistry.
The Khyber Pakhtonkhwa administration has confirmed death of Prof Hussain in the attack.
— Talha Nasir (@TalhaNasirXD) January 20, 2016
Security forces reached the Bacha Khan university as police said they had deployed armoured vehicles.
Television images showed female students clutching hands as they fled the university, with traffic blocked on the roads of Charsadda as security forces rushed towards the campus.
Peshawar was the location of Pakistan’s deadliest ever extremist attack, when Taliban gunmen stormed an army-run school in December last year and killed more than 150 people, most of them children, in an hours-long siege.
AFP adds: Students spoke of one hero teacher — Syed Hamid Hussain — fighting back against the intruders, shooting his weapon in a bid to protect his charges.
Geology student Zahoor Ahmed said his chemistry lecturer had warned him not to leave the building after the first shots were fired, reported the AFP.
“He was holding a pistol in his hand,” he said.
“Then I saw a bullet hit him. I saw two militants were firing. I ran inside and then managed to flee by jumping over the back wall.”
Another student told television reporters he was in class when he heard gunshots.
“We saw three terrorists shouting, ‘Allah is great!’ and rushing towards the stairs of our department,” he said.
“One student jumped out of the classroom through the window. We never saw him get up.”
He also described seeing the chemistry professor holding a pistol and firing at the attackers.