Mohamed Fahmy and Baher Mohamed were pardoned by the president, Abdel Fatah al-Sisi, along with about 100 other prisoners.
Without an elected Parliament, the Egyptian president can change the law.
Surrounded by golden mantlepieces, tasselled curtains, a coterie of suits - Morsi didn't have the air of a man about to be ousted as president.
"There is a constant fear and anxiety. I never had this kind of feeling in my life. Now you are afraid in your own home," says a gay man in Egypt.
US Secretary of State John Kerry will press Egypt President President Abdel Fattah al-Sisi over a crackdown on the Muslim Brotherhood.
An Egyptian court on Saturday confirmed death sentences for more than 180 Islamists, including Muslim Brotherhood chief Mohamed Badie.
Ibrahim Mahlab, followed by his ministers, has taken an oath of office in front of President Abdel Fattah al-Sisi.
Egypt's new president Abdel Fattah al-Sisi is likely to face the same challenge from Islamists as his predecessors.
Abdel Fattah al-Sisi is to be sworn in as Egypt's new president on Sunday, which some fear could be a return to autocracy.
Abdel Fattah al-Sisi took a majority of the votes in the presidential election, while rival Hamdeen Sabbahi won just 3% of the vote.
The country's elections committee says it has dismissed Hamdeen Sabahi's appeal against voting results that gave Abdel Fattah al-Sisi a win.
Egypt's presidential frontrunner Abdel Fattah al-Sisi has said it will take up to 25 years for Egypt to achieve "true democracy".
A coalition has called for a boycott of Egypt's vote for a new constitution, which some see as an "indictor" of the army chief's presidential bid.
Egypt's army-backed rulers and allies of its deposed Islamist president gave the first signs on Saturday of a readiness to compromise.