Ban condemned Palestinian rocket attacks, but urged Israel to show "maximum restraint."
"Further escalation benefits no one," he said.
Minutes before Ban's arrival in Jerusalem from Egypt, Palestinian militants fired a rocket toward Jerusalem, just the second time it has targeted the city. The rocket fell in an open area southeast of the city.
Jerusalem had previously been considered beyond the range of Gaza rockets — and an unlikely target because it is home to the Al-Aqsa Mosque compound, Islam's third-holiest shrine.
Earlier Tuesday, a man identified as Hamas' militant commander urged his fighters to keep up attacks on Israel. Speaking from hiding on Hamas-run TV and radio, Mohammed Deif said Hamas "must invest all resources to uproot this aggressor from our land," a reference to Israel.
Israeli warplanes dropped leaflets on several Gaza neighborhoods asking residents to evacuate and head toward the center of Gaza City along specific roads. The army "is not targeting any of you, and doesn't want to harm you or your families," the leaflets said. Palestinian militants urged residents to ignore the warnings, calling them "psychological warfare."
The Israeli military relies on a network of informants to identify its targets. Masked gunmen publicly shot dead six suspected collaborators with Israel in a large Gaza City intersection Tuesday, witnesses said. An Associated Press reporter saw a mob surrounding five of the bloodied corpses shortly after the killing.
Clinton was also scheduled to meet with Palestinian President Mahmoud Abbas in the West Bank and Egyptian leaders in Cairo on Wednesday. Turkey's foreign minister and a delegation of Arab League foreign ministers traveled to Gaza on a separate truce mission. Airstrikes continued to hit Gaza even as they entered the territory.
"Turkey is standing by you," Turkish Foreign Minister Ahmet Davutoglu told the Hamas prime minister in Gaza, Ismail Haniyeh. "Our demand is clear. Israel should end its aggression immediately and lift the inhumane blockade imposed on Gaza."
It was unclear how diplomatic efforts to achieve a cease-fire and stave off a threatened Israeli ground invasion into Gaza were hampered by the hard-to-bridge positions staked out by both sides — and by the persistent attacks. Thousands of Israeli soldiers have been dispatched to the Gaza border in case of a decision to invade.
The U.S. considers Hamas, which has killed hundreds of Israelis in suicide and other attacks, to be a terror group and does not meet with its officials. The Obama administration blames Hamas for the latest eruption of violence and says Israel has the right to defend itself. At the same time, it has warned against a ground invasion, saying it could send casualties spiraling.
The conflict erupted last week, when a resurgence in rocket fire from Gaza set off the Israeli offensive, which included hundreds of airstrikes on militants' underground rocket launchers and weapons' stores.
The onslaught turned deadlier over the weekend, as airstrikes began targeting the homes of suspected Hamas activists, leading to a spike in civilian casualties. Hamas is deeply rooted in densely populated Gaza, and the movement's activists live in the midst of ordinary Gazans. Israel says militants are using civilians as human shields, both for their own safety and to launch rocket strikes from residential neighborhoods.
The conflict showed signs of spilling into the West Bank, as hundreds of Palestinian protesters in the town of Jenin clashed with Israeli forces during a demonstration against Israel's Gaza offensive.
Two Palestinian protesters were killed in anti-Israel demonstrations in the West Bank on Monday, according to Palestinian officials. Separate clashes occurred Tuesday in Ramallah, the seat of the Palestinian government, during the funeral for one of the dead.
Palestinian President Mahmoud Abbas, who lost control of Gaza to Hamas in 2007, now governs from the West Bank. Abbas claims to represent both areas, and there is widespread sympathy among West Bank Palestinians for their brethren in Gaza.
Barzak reported from Gaza City, Gaza Strip. Associated Press writers Hamza Hendawi in Cairo, and Karin Laub in Gaza City contributed to this report.