Many students have been arrested after the brutal attack in the northern city of Mardan, and the campus has been closed.
Reports suggest that two young men were accused of posting offensive content on Facebook. One survived with injuries.
Blasphemy is a highly sensitive and incendiary issue in Pakistan.
Critics say blasphemy laws, which allow the death penalty in some cases, are often misused to oppress minorities.
There have been other cases where people accused of it have been killed by an angry crowd.
The murdered student has been identified as Mashal Khan, who studied journalism. Some reports say he was shot, while others say he was beaten to death with planks.
"He was badly tortured after being shot at a close range... He was beaten with sticks, bricks and hands," senior police official Niaz Saeed told the AFP news agency.
Hundreds of people were involved, the officer said. Graphic video footage of the incident has emerged online.
Police had not been investigating the two accused men, nor had any case been filed against them, and the mob appeared to have acted on rumours, the Dawn newspaper reports.
Last month Prime Minister Nawaz Sharif voiced his support for a wide-ranging crackdown on blasphemous content on social media.
In a statement on his party's official Twitter account, he described blasphemy as an "unpardonable offence".
An official at Abdul Wali Khan University who spoke on condition of anonymity said Mr Khan was disliked by other students for his liberal and secular views.
At least 65 people have been murdered in Pakistan after being accused of blasphemy since 1990, a recent think tank report said.