A horrific video of the killings near Nigeriaâ€™s oil capital was posted on the YouTube video-sharing website.
Students say the four were mistaken for thieves in the village of Aluu.
University of Port Harcourt (Uniport) told students to go home after the demonstrations turned violent with houses, shops and cars burned.
Correspondents say anti-riot police and soldiers have been deployed to the campus, which the authorities say will remain shut until normality returns.
The students blocked a major motorway near the university for hours on Tuesday, blocking traffic in and out of Port Harcourt.
The focus on the demonstration then turned to Aluu, where the lynchings happened on Friday.
The houses targeted by students allegedly belonged to some of those behind the killings.
The video, which was posted to YouTube over the weekend, shows four men stripped naked, with tyres around their necks, being beaten by a mob with wooden sticks, before being set on fire.
One of their classmates, Paul Irabor, informed that the four had left the university campus to collect some money they were owed, when they were mistaken for thieves.
There are reports that the students took a laptop and mobile phones in lieu of the money owed.
Thirteen people, including the traditional leader of Aluu village â€“ which neighbours the campus in an area called Choba â€“ have been arrested over the killings.
Many residents of Aluu began fleeing on Monday, fearing revenge attacks.
Bashir Saâ€™ad Abdullahi says that Nigerians, disillusioned with their police force, sometimes take justice into their own hands and lynch suspected robbers but the brutality â€“ and the fact this incident was filmed and published on the internet â€“ has shocked the country.
Read Time:1 Minute, 34 Second