Saturday's order came at a hearing in an Islamabad court, where Musharraf was brought under heavy security as supporters and opponents gathered outside the court.
The judge ruled that he would be given judicial remand, which means that he would be held in custody until the next hearing on May 4. Musharraf's legal team had been pushing to get his estate on the edge of Islamabad declared a sub-jail under Pakistani law.
The Islamabad chief commissioner later issued a notification declaring the residence a jail, said police official Mohammed Khalid. Musharraf, who was taken from the court back to the police guesthouse where he had spent the night, was to be transported later Saturday to his private house in the country to remain there under house arrest.
Musharraf was arrested in the case that stems from his decision, while in power, to sack and detain the judges, including the country's chief justice, after declaring a state of emergency and suspending the constitution.
At the time, Musharraf was apparently concerned the judges would push back against his re-election as president. As a justification for the state of emergency he also cited the growing Taliban insurgency in the country's northwest.
But the move backfired horribly. The country's lawyers took to the streets in widespread protests that eventually weakened Musharraf's government so much that he was forced to call new elections and step down.
A judge has said Musharaf's 2007 decision amounted to terrorism, which is why the case is now being heard before an anti-terrorism court. Such courts are closed to the media and the public.