His visit, coming after the Islamic State group (IS) killed dozens of worshippers in three Egyptian church bombings earlier this month and in December, gave the country's beleaguered Christian community an occasion to be joyful.
"The only fanaticism believers can have is that of charity," the pope said at a mass for Egypt's Catholics.
"True faith... Moves our heart to love everyone... It makes us see the other not as an enemy to be overcome but a brother and sister to be loved," he told a crowd of about 15,000 pilgrims.
The mass came on the second and last day of Francis's visit, which saw him plead for tolerance and peace on Friday as he visited a Coptic church bombed by IS in December.
More From This Section
The spiritual leader of the world's almost 1.3 billion Catholics also became the first pope to visit the headquarters of the grand imam of Al-Azhar, Ahmed al-Tayeb, one of the Muslim world's leading religious authorities.
Also on Friday, Francis met Coptic Orthodox patriarch Pope Tawadros II, and both attended an emotional service at the church attacked in the December suicide bombing.
They also signed a joint declaration pledging to "strive for serenity and concord through a peaceful co-existence of Christians and Muslims".
On Saturday, the crowd cheered and released yellow and white balloons as Francis lapped the Cairo stadium in a golf cart, waving to the crowd as a chorus sang a joyous hymn.
Worshippers old and young, nuns and priests, had been bused in under tight security with Egypt under a state of emergency following the church bombings.
It was, said Coptic Catholic engineer Maged Francis, a "historic occasion".
The stadium chosen for Saturday's mass is on Cairo's outskirts and easier to secure, but in 2015 it saw clashes between football fans and a stampede that killed 19 people.
After the mass, the pope travelled to a seminary in Cairo where he urged his audience to promote dialogue.
Heavy security surrounded his tightly scheduled trip as he travelled from one engagement to another in a closed car.
IS has threatened further attacks after the suicide bombings that killed 29 people in Cairo in December and 45 people in the cities of Tanta and Alexandria north of the capital earlier this month.
"Peace alone... Is holy and no act of violence can be perpetrated in the name of God, for it would profane his name," Francis said.
He criticised what he called "demagogic forms of populism... On the rise", saying they were unhelpful to peace.
In another speech attended by Egyptian President Abdel Fattah al-Sisi, the pope also called for "unconditional respect" for human rights.
Sisi has been criticised internationally for human rights abuses since he led the military overthrow of his Islamist predecessor Mohamed Morsi in 2013.