Mr Mugabe had been under house arrest for days. The army made its move after a power struggle over his successor.
The military said on Friday it was "engaging" with Mr Mugabe and would advise the public on the outcome of talks "as soon as possible".
Mr Mugabe was cheered by the crowd at the graduation ceremony after he spoke, a witness quoted by Reuters news agency says.
Neither the 93-year-old president’s wife, Grace Mugabe, nor Education Minister Jonathan Moyo - an ally of hers whose house was reportedly raided by the military - were present.
The army acted after Mr Mugabe sacked Vice-President Emmanuel Mnangagwa last week. Mr Mnangagwa was seen as a potential successor and his sacking paved the way for Mr Mugabe’s wife Grace Mugabe - who is four decades younger than him - to take over the presidency instead.
Mr Mugabe’s attendance at the graduation is an annual tradition but few expected to see him there.
Source: BBC News