El Erian, a doctor who is head of the Brotherhood's political department, has been in and out of detention for more than 15 years as a result of his activities with the Muslim Brotherhood.
The government considers the Brotherhood an illegal organisation and frequently detains its members without charge.
About 40 members are currently on trial in military court on terrorism and money-laundering charges in a trial that rights groups say is unfair.
An order for the release of Nabeel Moqbel, a prominent Egyptian businessman and Brotherhood member, has also been issued.
On Wednesday, another court ordered the release of three other members, including Mahmoud Ghozlan, a member of the group's decision-making body, the Guidance Bureau.
The Brotherhood, which has renounced violence, seeks an Islamic state through democratic elections and operates openly despite an official ban dating back to 1954.
Brotherhood members, the largest opposition group, hold 88 seats in Egypt's 454-member lower house of parliament.