Khan's lawyer has told the media that his client denies the crime and the court’s order will be challenged.
The two Pakistan Tehreek-e-Insaf (PTI) politicians - Imran Khan, the party's chairman, and Qureshi, the party's deputy chairman - were charged after they filed a petition under CrPC 265-D to stop the prosecution, the Pakistani daily Dawn reported.
The court was set up to hear the encryption case registered under the Official Secrets Act, and Special Judge Abual Hasnat Zulqarnain conducted the hearing at Adiala Jail in Rawalpindi city.
The judge, while rejecting the petitions, declared that the hearing was fixed for the purpose of indictment and proceeded with it.
The cipher case concerns a diplomatic document that reportedly went missing from Khan's possession. His party, the PTI, claimed that the document contained a threat from the US to ensure that Khan, then prime minister, was removed from office.
According to the Pakistani daily Dawn, Khan was convicted in the Toshakhana (treasury) graft case on 5 August and sentenced to three years in prison. The Islamabad High Court (IHC) suspended his sentence on 29 August. However, Khan had to remain behind bars as he was on judicial remand in the encryption case.
Later, on 30 September, Pakistan's Federal Investigation Agency (FIA) filed a charge sheet in the special court. It named Qureshi as the prime accused in the encryption case.
The court then decided to indict Khan and Qureshi in the case on 17 October. However, it was adjourned to today's hearing.
The court has now summoned the witnesses for the next hearing, which will be held next Friday (27 October).
Khan and Qureshi, the two PTI politicians, were present when their indictment was announced.