The special court found Khan guilty of making public the contents of a secret cable sent by Pakistan's ambassador in Washington to the government in Islamabad, his Pakistan Tehreek-e-Insaf (PTI) party said. Former foreign minister Shah Mehmood Qureshi was also sentenced to 10 years in the same case.
The jail term is the second conviction for Khan in recent months, and ensures the popular politician will remain in jail, and out of the public spotlight, ahead of next week's parliamentary vote which will also lead to the nomination of a new prime minister.
The court was due to issue its written verdict later.
The PTI said it would challenge the decision. "We don't accept this illegal decision," Khan's lawyer Naeem Panjutha posted on social media platform X, formerly Twitter.
Khan aide Zulfikar Bukhari told Reuters that the legal team was given no chance to represent the former prime minister or cross examine witnesses, adding that the proceedings were carried out in jail.
Another one of Khan's lawyers, Ali Zafar, told ARY television that given the circumstances of the trial and sentencing, the chances of the case being quashed in appeal was "100%".
He called the conviction an attempt to weaken support for Khan. "People will now make sure they come out and vote in larger numbers," he told Reuters.
Khan was previously sentenced to three years in a corruption case, which had already ruled him out of the election next week.
However, his legal team was hoping to get him released from jail, where he has been since August last year, but the latest conviction means that is unlikely even as the charges are contested in a higher court.
MULTIPLE CASES
Khan has been fighting dozens of cases since he was ousted from power in a parliamentary vote of no confidence in 2022.
Khan says the cable that pertains to the case was proof of a conspiracy by the Pakistani military and the U.S. government to topple his government in 2022 after he visited Moscow just before Russia's invasion of Ukraine.
Washington and the Pakistan military deny the accusations.
The former prime minister has previously said the contents of the cable appeared in the media from other sources.
Khan's PTI, which won the 2018 elections, suffered a major setback earlier this month when a court upheld the Election Commission's decision to strip the party of its traditional election symbol, the cricket bat.
His candidates are now contesting as independents, many of them on the run amidst what the party calls a crackdown backed by the country's powerful military. The military denies this.
Khan's media team posted a message from the jailed leader on social media platform X in the moments that led up to the verdict, preempting a guilty verdict. The message was ostensibly delivered by Khan through his lawyers.
"These people want to provoke you by giving me a harsh sentence in this case so that you go out on the streets and protest, then add unknown people to the crowd and then do another false flag operation," the post said.
In May last year, the first time Khan was arrested, his supporters were accused of rioting and ransacking military installations, including a high ranking general's home. Khan denies his supporters were part of the mobs.
He called on his supporters to make sure they came out in numbers to vote for candidates backed by him.
"This is your war and this is your test that you have to take revenge for every injustice by your vote on February 8 while remaining peaceful," the post added.
The sidelining of Khan and his party, one of the largest in the country, has cast doubts over the credibility of the upcoming elections.