Ban demanded that Morsi and his high-level backers "be released or have their cases reviewed transparently without delay," said deputy UN spokesman Eduardo del Buey.
Morsi and several Muslim Brotherhood leaders have been detained since the military drove him from power on July 3 in response to massive protests calling for his ouster.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
With tensions again rising in Egypt ahead of rival rallies by followers of Morsi and the army on Friday, the spokesman said Ban "is following closely, and with growing concern, developments in Egypt.
"The secretary general once again urges all sides to act with maximum restraint. He supports the rights of all Egyptians to hold peaceful protests.
"He calls on the interim authorities to ensure law and order along with guaranteeing the safety and security of all Egyptians."
Ban "renews his calls for a meaningful national dialogue and an inclusive reconciliation process. The aim must be to chart a peaceful path towards a full return of civilian control, constitutional order, and democratic governance," said del Buey.

