President Abdel-Fattah El-Sisi and UN Secretary General Ban Ki Moon looked at means to bolster Egypt-UN cooperation and issues of mutual interest, including on Libya and Gaza, as they met in New York on Sunday.
Ban also urged the release of political detainees in Egypt in discussions with El-Sisi, the UN said in a statement.
Growing militia violence in Libya and the fear of a spillover into neighbouring countries, including Egypt, has raised alarm bells in the region.
El-Sisi has recently said that Egypt is committed to support the fight against Jihadists in the region.
Meanwhile, Ban expressed anxiety over what he viewed as the lack of fair trials and the jailing of journalists" in Egypt -- presumably referring to Al Jazeera case.
Three reporters from the Qatar-based news network were sentenced to between seven and 10 years in jail for defaming Egypt and aiding the banned Muslim Brotherhood group, in a verdict that sparked a global outcry.
"The Secretary-General expressed concern about the absence of due process for detainees and sentencing of journalists in Egypt, and called for the release of those detained solely for exercising their right to freedom of expression and association," the UN said in a statement on Sunday.
El-Sisi said the Egyptian judiciary was "fully independent" under the principle of separation of powers, presidential spokesman Alaa Youssef was quoted as saying by Aswat Masriya.
The Egyptian president said all legal rights are guaranteed to Egyptian defendants, and stressed the country's new charter enshrines basic rights and freedoms.
On Gaza, both leaders agreed on the need for a "sustainable ceasefire" in the recently war-stricken Palestinian territory and for a "political process that achieves durable peace," after a 50-day war in the coastal enclave, which ended with a truce on 26 August, killed over 2,140 Palestinians, mostly civilians, and 73 Israelis, mostly soldiers.
The UN top leader condemned a "terror" bomb attack in central Cairo on Sunday that left two policemen dead, the latest in a series of militant attacks targeting police and troops.
El-Sisi's visit to the US, to take part in the 69th session of the UN General Assembly, is the first since he became president in June, almost a year after the former army chief led the ouster of Morsi following massive street protests against the Islamist president.