This is the first time security forces have moved onto a campus since a 2010 court ruling banned guards belonging to the interior ministry from operating on their grounds.
The interior ministry said it had responded to a request for help from university authorities.
Pro-Morsi students had been holding protests at the campus for weeks.
The operation come hours after the arrest of Essam al-Erian, a senior leader in the Muslim Brotherhood movement to which Morsi belongs.
More From This Section
The interior ministry said in a statement that the action was taken to "protect lives and public property".
The latest moves are part of a crackdown by the interim government against the Islamist movement.
Pro-Morsi students had also stormed an administration building on the campus. Gunshots were also heard from the campus, media reports said.
University security forces also used water cannons in an unsuccessful attempt to disperse the pro-Morsi protesters.
The students are holding the university president and some staff members inside the building against their will, and had thrown documents out of the windows of the building, a security official was quoted as saying by state television.
Students said they were standing peacefully when university security used water cannons while the university staff has denied the allegations saying they had reacted to protesters hurling stones at them.
Supporters of Islamist president Mohamed Morsi have been staging regular protests calling for his reinstatement since his ouster by the army on July 3.
Protests have often resulted in clashes with security forces.
Since the beginning of the new academic year, demonstrations have shifted to university campuses.
Al-Azhar is a key centre of Islamic learning and has witnessed regular protests in recent weeks.