The 70-year old Tayeb was appointed by ousted president Hosni Mubarak in 2010, and as a senior member of the strongman's National Democratic Party, was widely viewed as possibly another compliant cleric of the state.
But the bookish philosopher has proved to be an astute politician, leveraging the uprising that ousted Mubarak to gain some autonomy for Al-Azhar, viewed as Sunni Islam's paramount seat of learning.
His efforts paid off by securing Al-Azhar the right to elect its own head, rather than having him appointed by the president.
Since 2013, when then army chief Abdel Fattah al-Sisi overthrew Islamist president Mohamed Morsi, Tayeb has walked a fine line to maintain an independent role for the institution.
Tayeb, like the Coptic Orthodox Church and the country's opposition leaders, supported Morsi's overthrow, which led to a bloody crackdown on Islamists that killed hundreds of protesters.
He had tried reaching out to Morsi's Muslim Brotherhood to avoid further bloodshed, at a time when the military-appointed regime seemed more interested in eliminating the group.
Egypt has faced a deadly jihadist insurgency since, while now President Sisi has pressured Al-Azhar to "modernise" Islamic thought -- a controversial mandate from a former general who lacks religious scholarly credentials and who came to power by suppressing political Islamists.
"There is tension between an executive that wants to do the whole religious revolution stuff and Al-Azhar, which doesn't necessarily view the state as having the competency to even engage in this discussion," said analyst HA Hellyer.
ADAPTING ISLAMIC THOUGHT
Signup to our newsletter and follow us on Facebook and Twitter!
"They're not interested in being encouraged in that direction by someone they see as outside the religious establishment," said Hellyer, a senior non-resident fellow at the Atlantic Council Centre for the Middle East.
Tayeb himself has espoused adapting Islamic thought to the 21st century, especially for Muslims living in Western countries, while refuting the ultra-conservativism of jihadis.
He has condemned the Islamic State group and other jihadists as "terrorists" and fanatics whose brand of Islam is misguided at best.
But the former professor of Islamic philosophy, who received a PhD from Paris-Sorbonne University, has stressed that reforms should be grounded in classical Islamist thought.
He combines both "preserving tradition and modern thought and civilisation", said Sheikh Mohamed Mohanna, an adviser to Tayeb.
"He studied in France. He is open to the world," he said.
When he headed Al-Azhar University before becoming head of the umbrella institution, Tayeb would gently chastise his students on minding the finer points of Arabic grammar as they read aloud a classic text, while telling them to keep an open mind to philosophy.
"Those people, they served Islam," he told students about rationalist Mutazilite Muslims viewed as heretics by many Sunni scholars.
"I mean having a disagreement shouldn't exclude someone from being a Muslim. This is just a war between schools of thought, whose place is the classroom."
Tayeb was especially inspired by the great Andalusian Sufi Ibn Arabi, and translated works by French Orientalists on the 12th century mystic.
"He looks for wisdom wherever he can find it," said Mohanna.