CAIRO—An Egyptian court on Tuesday upheld a death sentence against former President Mohammed Morsi, in a session that underlined the judiciary’s hostility toward the ousted leader and his Islamist allies.

The decision was one of two significant verdicts against Mr. Morsi on Tuesday and set the stage for the possible execution of Egypt’s first freely elected president. The sentence stems from a case in which Mr. Morsi was accused of escaping prison in 2011 during a popular revolt against longtime ruler Hosni Mubarak.