Francis presided at an open-air Mass on the grounds at the John Garang Mausoleum, the burial site of South Sudan's liberation hero who died in a helicopter crash in 2005 before the predominantly Christian country broke away from Muslim Sudan in 2011.
Large crowds of ecstatic worshippers streamed into the mausoleum in Juba to see the 86-year-old pontiff, who made peace and reconciliation the theme of his three-day trip to the world's newest nation.
He begged the crowd of about 70,000 people to shun the "blind fury of violence."
"Let us lay down the weapons of hatred and revenge... Let us overcome the dislikes and aversions that over time have become chronic and risk pitting tribes and ethnic groups against one another," he said in his homily.
Two years after independence, South Sudan plunged into a civil war that killed 400,000 people.
Despite a peace deal signed in 2018 between President Salva Kiir and his deputy Riek Machar, many of its conditions remain unmet and violence continues to roil the country, driving people from their homes into displacement camps.
At the end of the service, in a farewell address shortly before heading to the airport to fly home, the pope thanked the people of South Sudan for the affection they showed him.
"Dear brothers and sisters, I return to Rome with you even closer to my heart," he told the crowd. "Never lose hope. And lose no opportunity to build peace. May hope and peace dwell among you. May hope and peace dwell in South Sudan!"
The pope has had a longstanding interest in South Sudan. In one of the most remarkable gestures of his papacy, he knelt to kiss the feet of the country's previously warring leaders during a meeting at the Vatican in 2019.
Archbishop of Canterbury Justin Welby, leader of the global Anglican Communion, and Iain Greenshields, Moderator of the General Assembly of the Church of Scotland, accompanied the pope during his visit to South Sudan.
On Saturday, Francis met victims of the civil war, who were brought to Juba from various camps, and urged the government to resume the peace process and restore "dignity" to the millions affected by conflict.
With 2.2 million internally displaced people (IDPs), and another two million outside the country, South Sudan is witness to the worst refugee crisis in Africa.
Pope Francis visited the Democratic Republic of Congo earlier in the week where he spent three days in the nation meeting with civic and religious leaders and victims of conflict.
This visit to South Sudan and the DRC marked his third tour to Africa.
This report was compiled with information from Reuters and Agence Frances-Presse