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.
Musharraf returned to Pakistan last month to make a political comeback and contest the May 11 election. But he was greeted with little popular support and was disqualified from running in the election. A judge on Thursday ordered his arrest.
That sparked a dramatic escape by Musharraf from court in a speeding vehicle after which he holed up in his heavily guarded house on the outskirts of Islamabad until he was taken into custody on Friday morning.
Musharraf seized control of Pakistan in a coup in 1999 when he was army chief and spent nearly a decade in power before being forced to step down in 2008. He returned despite Taliban death threats and a raft of legal challenges.
He also faces legal charges in connection with the 2007 assassination of the former prime minister Benazir Bhutto and the 2006 death of a Baluch nationalist leader.