The two leaders "affirmed that any attempt at the expulsion to Jordan or Egypt is rejected", official Jordanian TV said after the two men met in Cairo.
They also warned that any expansion of the war, ignited by a surprise attack by Hamas militants in southern Israel that killed about 1,400 people, could "send the region into a slippery slope" and called for the war "to immediately stop," according to the Jordanian TV.
In Cairo, a presidential statement said King Abdullah and President El Sisi "emphasized their rejection of collective punishment like blockading, starving or evicting the Palestinians from their lands ... They also warned against the extreme danger of such plans on regional security."
King Abdullah's visit to Cairo comes days after he toured London, Rome and Berlin to warn of the impact of Israel's retaliation on Gaza, in response to the Hamas attack on October 7.
About 3,500 Palestinians have been killed in Israel's bombardment of Gaza with one million displaced. The enclave is also suffering a significant humanitarian crisis, with the Israeli blockade denying the Palestinians water, food and fuel.
Attempts to secure aid for Gaza have resulted in aid lorries lined up at the border crossing with Egypt, with relief expected to arrive on Friday.
King Abdullah's surprise visit to Cairo appeared in large part an attempt by Jordan and Egypt to chart the way forward in handling the Gaza conflict and counter the sympathy and support for Israel in the West, particularly in the US.
Both countries maintain ties with Hamas, although Egypt is more connected with the Iranian-backed group because it shares a border with Gaza. Mr El Sisi and the Jordanian monarch also have close ties with President Mahmoud Abbas, who heads the Palestinian Authority in the Israeli-occupied West Bank.
The Jordanian and Egyptian authorities already have issued repeated warnings that any movement of Palestinians across their borders would constitute a national security threat. Although Jordan does not border Gaza, officials in Amman are concerned the war could spread to the West Bank.
For decades, Egypt has criticised Israeli pressure on the Palestinians, fearing it could drive Gaza's 2.3 million residents into the sparsely populated Sinai Peninsula.
Egypt was the first Arab nation to sign a formal peace treaty with Israel in 1979. Jordan, which borders the West Bank and is nominally the official guardian of Muslim holy sites in Jerusalem, followed suit in 1994. Both are US allies and among the top three recipients of American aid.
There has also been a surge in violence in the West Bank that could yet worsen.
Egypt and Jordan, generally viewed as moderate, drew closer in recent years, seeking with Iraq to lay the foundation of an economic alliance that would complement each other's economy as well as energy resources.
They have used close ties with the US. Relations with Israel and Palestinian factions have seen them become the most active Arab interlocutors in years of on-and-off negotiations in a bid to resolve the Palestinian-Israeli conflict. Israel and its two other Arab neighbours - Syria and Lebanon - are officially at war.
Some fear more Palestinian refugees would upset a social balance overseen by King Abdullah between those who since 1948 have been coming from Palestine and tribes who were a cornerstone of Jordan's founding as a British protectorate in 1921.
Most of Jordan's 10 million population are descendants of refugees who fled the conflict surrounding Israel's creation in 1948 and Israeli expansion after the 1967 Arab-Israeli war.
Khaled Yacoub Oweis contribute to this story from Amman.