Police used teargas and birdshot to disperse protesters at Al-Azhar University on Sunday.
The students had destroyed a "segregation wall" erected to separate the dormitories and administrative buildings after violent protests last semester.
The protest was in response to the recent jailing and expulsion of students, Mohamed Atef, acting president of Al-Azhar student union, told Al-Ahram Arabic news website.
Atef criticised the destruction of the wall and said protests should remain peaceful.
On Saturday, 16 Al-Azhar students were sentenced to three years in prison for taking part in clashes in December.
While on Thursday, a court sentenced 17 others to 14 years in jail on charges of rioting, damaging public property, burning vehicles and attacking security personnel and Al-Azhar staff.
Al-Azhar University, the highest seat of Sunni Islamic learning, has been the site of numerous protests since the ouster of Islamist president Mohamed Morsi in July 2013.
Clashes have often broken out between pro-Morsi students and security forces at the university's campuses in Cairo and other cities.
In February, the interim authorities issued a decree allowing security forces to enter campuses and granting university administrators the right to expel protesting students.
A number of other universities have witnessed protests, but none as intense as Al-Azhar.
Four students have been killed at the university since the beginning of last semester, a spokesman for the Forensic Authority said in January.