When opposition parties united against Khan last week to push for the no-confidence motion, the deputy speaker of parliament, a member of Khan's party, threw out the motion, ruling it was part of a foreign conspiracy and unconstitutional.
Khan then dissolved parliament. Thursday's ruling could spell the premature end of Khan's tenure in a country where no elected leader has finished their full term in office.
The 69-year-old, who steered Pakistan to cricket World Cup victory in 1992, came to power in 2018 after rallying the country behind his vision of a corruption-free, prosperous nation respected on the world stage.
But it appears that the firebrand nationalist's fame and charisma may not be enough to keep him in power.
If Khan were to lose the no-confidence vote, the opposition could nominate its own prime minister and hold power until August 2023, by which date fresh elections have to be held.
The opposition has said it wants early elections, but only after delivering a political defeat to Khan and passing legislation it says is required to ensure the next polls are free and fair.
Pakistan's election commission said on Thursday that the earliest it could hold the ballot was October. The crisis is a worry for economic policymakers in Pakistan, that is in the middle of an International Monetary Fund bailout.
The Pakistan rupee took a battering on Thursday as the country awaited the court's judgment, hitting record lows.
"As (the) dollar continues to soar, a massive economic meltdown is staring the country in the face," Shehbaz Sherif, an opposition leader who is among the favourites to replace Khan as prime minister, said in a tweet.
It also threatens relationships with long-time ally the United States, who Khan has blamed for being behind a conspiracy to overthrow him. Washington denies this.