The chief judge also demanded a detailed report from a three-man commission on the treatment of the detainees and the situation inside the prisons.
President Mahmoud Ahmadinejad, whose disputed re-election is the main reason for the current crisis in Iran, has already sacked his information minister and head of the intelligence service, Gholam-Hossein Mohseni-Ejei.
Moussavi had accused security officials of treating prisoners the way detainees were treated when the shah ruled Iran.
In a statement issued Monday on his website, Moussavi termed the killings and arrests of the protesters as a catastrophe and said 'people would never forget those elements behind these crimes'.
Moussavi expressed worry that even the judiciary was not aware of the mass arrests and treatment of the prisoners, indicating that some security officials were acting independently.
The concern within parliament over the detainees, the order by the judiciary chief and Khamenei's order to close down the Kahrizak prison are considered by observers as the first victory for Moussavi and the opposition.