The Supreme Constitutional Court (SCC) said the law governing the elections of the upper house, known as the Shura Council, was unconstitutional.
The presiding judge, Maher al-Beheiry, said the Shura Council should remain in place until the election of a new parliament, but it had no authority to legislate.
The case against the Shura Council is based on several challenges by lawyers of the law that governed the election of its members.
Both the upper and lower houses were elected under the same electoral law, which the SCC last year deemed invalid, prompting the dissolution of parliament.
A date has yet to be set for new elections, which President Mohamed Morsi said could begin in October.
The court also ruled as illegal the body which drafted a constitution that was approved in a popular referendum in December.
The implications of that ruling were not immediately clear. Some legal experts say that the constitution itself is above legal challenge because it was approved by a popular vote.
The ruling seemed likely to heighten tension between the Muslim Brotherhood and the judiciary over judicial reforms which the Brotherhood see as necessary to removing Mubarak-era appointees, but judges see as a bid to purge their ranks.