The Cairo Administrative Court ruled on Tuesday that it does not have jurisdiction to hear a case calling for the dismissal of General Prosecutor Talaat Abdullah.
He was appointed by President Mohamed Morsy last year.
MENA quoted members of a judicial panel saying it cannot rule on the legality of Abdullah's appointment.
Last year, Morsy sparked controversy by issuing a decree to dismiss former Prosecutor General Abdel Meguid Mahmoud, who was accused of being a loyalist to ex-President Hosni Mubarak.
The move was unprecedented in Egyptian legal history, since the Constitution does not allow the president to categorically sack the country's prosecutor general.
On Monday, Abdallah came under fire from the opposition after he ordered the arrest of five anti-Brotherhood activists accused of inciting violence near the Muslim Brotherhood's headquarters in Moqattam.