Speaking at an open-air Mass before a huge crowd, he urged the international community and Arab countries in particular to find a solution to end the conflict in neighboring Syria.
"Why so much horror? Why so many dead," Benedict said, lamenting that "the first victims are women and children."
With pilgrims from across the Middle East in the crowd he said Christians must do their part to end the "grim trail of death and destruction" in the region.
"I appeal to you all to be peacemakers," Benedict said.
Benedict spoke from an altar built on land
Later in the evening, the pope boarded a Lebanese Middle East Airlines jet that took off to Rome.
The Rev. Federico Lombardi, a Vatican spokesman, said local organizers put the crowd at some 350,000 people.
Benedict said that justice and peace are needed in building "a fraternal society, for building fellowship."
Fadia Kiwan, a political science professor at Beirut's St. Joseph University, said the pope's visit is political and its message is that "the West does not want Christians to leave the Middle East."
She added that the visit calls "for living together
"This is a visit of political interest more than religious interest. It is political visit that should help in reducing tension between Christians and Muslims in general," she said.
The 85-year pope, wearing green vestments, appeared to be holding up well in the Mediterranean heat.
Helicopters flew overhead and soldiers set up roadblocks and patrolled streets in downtown Beirut.
The crowd cheered and waved tiny Vatican and Lebanese flags as Benedict arrived in his bullet-proof popemobile at the Mass site on the Beirut waterfront.
Benedict has been appealing for tolerance and religious freedom.
The papal visit comes amid soaring sectarian tensions in the region, exacerbated by the conflict in Syria, which is in the throes of an 18-month-old civil war. At a meeting with young people Saturday evening, the pope said he admired the courage of Syrian youth and that he did not forget their suffering.
Representatives from Lebanon's many religious groups attended.
Patriarch Bechara al-Rai, head of the Maronite Catholic Church, told the pope shortly before the Mass began, "Your visit is a safety valve at a time when Christians feel the instability and are faithfully resisting to confirm they are deep-rooted in this land despite the major challenges."
Many Christians in the Middle East are uneasy at the Arab Spring, which has led to the strengthening of Islamist groups in most countries that have experienced uprisings.
Nawaf al-Moussawi, a representative of the Shiite Islamist militant group Hezbollah who attended the mass, told Lebanon's LBC TV: "Our message is that we want to work together for a Middle East and a region where religions and sects live on the basis of justice that leads to peace.
"What we complain about in the region today is that we are suffering from the injustice of colonial policies," al-Moussawi added in an apparent reference to U.S. policies. "We only see its fleets." Hezbollah is allied with Syria, which blames an alleged Western and Arab conspiracy for its woes.
The U.S. considers Hezbollah a terrorist organization. Spokesman Lombardi declined to say what the Vatican's position is on the group.