Mr Mugabe was cheered by the crowd at the graduation ceremony after he spoke, a witness quoted by Reuters news agency says.
He joined the crowd in singing the national anthem and walking slowly up a red carpet.
Neither his wife, Grace Mugabe, nor Education Minister Jonathan Moyo were present.
His attendance at the graduation is an annual tradition but few expected to see him there after he was put under house arrest, the BBC’s Andrew Harding reports from Zimbabwe.
The army took control after Mr Mugabe last week sacked Vice-President Emmerson Mnangagwa, signalling that he favoured Grace Mugabe to take over his Zanu-PF party and the presidency.