Foreign Minister Jean-Yves Le Drian's visit comes in the wake of several attacks in France apparently provoked by anger over the defense of the caricatures, considered blasphemous by Muslims, as freedom of expression.
After meeting Egyptian President Abdel Fattah al-Sisi and Foreign Minister Sameh Shoukry, Le Drian said an "anti-French" campaign in the Muslim world had often been the result of a distortion of French President Emmanuel Macron's comments on the issue.
"We have a first principle which is the highest respect for Islam," Le Drian told reporters. "I also want to say that Muslims are fully part of society in France.
"The second message is that we're confronted by a terrorism threat, fanaticism, on our soil but also elsewhere, and this battle is a common battle."
Le Drian said he had a long exchange marked by "great frankness" with Sheikh Ahmed al-Tayeb, who heads al-Azhar, Cairo's thousand-year-old seat of Sunni Muslim learning.
"I noted numerous points of divergence in our analyzes. I told the Grand Imam how much we need a voice of balance, tolerance and moderation," Le Drian told reporters.
French officials later said Le Drian had meant to say "convergence," not "divergence."
The only battle France was fighting with Egypt and other countries was against extremism, Le Drian said.
"The Grand Imam suggested that we work together to deepen this common convergence."
In a written statement about the meeting, Tayeb said he had stressed that any insult against the prophet was unacceptable.
"I am the first to protest against freedom of expression if this freedom offends any religion, not just Islam," he said."We refuse to describe terrorism as Islamic," he added. "Al-Azhar represents the voice of nearly two billion Muslims, and I said that terrorists do not represent us, and we are not responsible for their actions."