Benazir Bhutto, also a former prime minister who recently returned from exile, tried to visit Chaudhry last month. She was also blocked.
Bhutto and her Pakistan People's party are in negotiations with Sharif's Muslim League over demands they plan to issue Musharraf on pain of an election boycott.
A boycott by the two main opposition parties and smaller allies would rob the January 8 vote of credibility and prolong instability in the country.
Opposition figures said the two parties differed over whether to demand the restoration of 37 judges, including Chaudhry.
Bhutto says the new parliament should decide on the fate of the judges.
Javed Hashmi, a senior official in Sharif's party, said: "There is no question of compromise on this issue. We are saying it should be before the election. The PPP says it should be after the election."
Musharraf dismissed the judges after he imposed emergency rule on November 3. He has since stacked the court with loyalists, who have promptly dismissed all complaints against the former general's election.
Lawyers in other cities boycotted court proceedings, hoisted black flags and staged rallies to demand an end to emergency rule, reinstatement of the dismissed judges and restoration of the constitution, Syed Mohammed Tayyab, secretary-general of the Islamabad Bar Association, said.
Lawyers in Islamabad, Peshawar, Quetta, Lahore and Karachi confirmed that they refused to appear in court and that hundreds staged protest gatherings, mostly at court premises.
Several lawyers and police were injured in scuffles at a rally in the central city of Multan, witnesses said.
Musharraf stepped down as army chief last week and has promised that emergency rule will be lifted on December 16, fulfilling two main demands of his rivals and his Western backers.
But Musharraf has ruled out reinstating the judges, several of whom remain under house arrest.
The president has been at odds with the judiciary since he first tried to sack Chaudhry in March.
|The Pakistani military says it has retaken|
control of the Swat valley [AFP]
Musharraf justified the emergency citing "interference" by the judiciary and rising militancy, particularly in the northwestern valley of Swat.
The army launched an offensive last month to drive out fighters there and on Thursday announced it had succeeded.
The Pakistani military said its forces had cleared out armed groups trying to impose Taliban-style rule there.
The military says it has regained control of the towns of Matta and Khawzakhela, and are searching a religious school that had been the headquarters of Fazlullah, the leader of the movement.
The military says operations in the mountain area during the past two weeks have killed nearly 250 fighters as well as about 15 soldiers and 30 civilians.