A Pakistani court suspended a sentence for Mr Khan on Tuesday after he was found guilty of unlawfully selling state gifts. The court said he could be released on bail.
A special court held proceedings in Attock Jail, where Mr Khan was serving a three-year sentence on those charges. He was barred from leaving as he was still under remand in the official secrets case.
Mr Khan's time in Attock, 60 kilometres west of Islamabad, had kept him from contesting coming elections.
"This constitutes a manipulation of justice," Muhammad Shoaib Shaheen, one of Mr Khan's lawyers, said on Tuesday.
Wednesday's hearing looked into a cable that Mr Khan had used as proof that he was ousted as part of a US conspiracy, a report by the government's Federal Investigation Agency said.
The US and the Pakistani military have denied the claim.
Mr Khan's legal troubles began when the 70-year-old former national cricket captain lost his position as prime minister in a no-confidence vote in April last year.
Mr Khan denies any wrongdoing and claims the accusations against him are politically motivated.
Pakistan is due to hold a general election later this year but the polls may be delayed due to the redrawing of constituencies based on the country's latest census.