Twenty seats were up for grabs in the Punjab by-election, which was seen as a popularity test for the former international cricket star dismissed by a no-confidence vote in April.
His Pakistan Tehreek-e-Insaf (PTI) party won 15, with the Pakistan Muslim League-N (PML-N) of current Prime Minister Shehbaz Sharif taking four, and one going to an independent.
Sunday’s vote was also seen as a bellwether for national elections that must be held by October next year, although Khan has campaigned across the country for an earlier poll since being dismissed.
“The only way forward from here is to hold free and transparent elections,” Khan tweeted early on Monday after the Punjab votes were tallied.
“Any other way will only lead to increased political uncertainty and further economic chaos.”
Al Jazeera’s Kamal Hyder, reporting from Punjab state’s main city of Lahore, said the election victory “is a huge comeback for Khan”.
“You cannot rule out the possibility that he may become the prime minister again if there are free and fair elections and if his party performs well as it has done in Punjab,” he said.
Khan has drawn thousands to rallies since being removed, giving lengthy speeches claiming the government was imposed on Pakistan under a United States-led conspiracy.
He also blames the current government for soaring inflation, although most analysts agree Sharif inherited the country’s economic woes – which got some relief last week following an agreement with the International Monetary Fund (IMF) to resume a rescue package.
To meet IMF conditions for a resumption of a $7.2bn aid package, Sharif had to remove subsidies on fuel, effectively raising prices by more than 50 percent in less than two months.
The country is expecting another $4bn from friendly countries this month to avoid a looming default on international liabilities.
Pakistan newspapers suggested the Punjab result was a consequence of the economic hardships currently felt by the country, which is spending nearly half its income to service dire foreign debt.
“A bitter taste of unpopular decisions,” read a headline in the influential Dawn newspaper over a front-page analysis.
The Punjab assembly vote was called after the election commission disqualified 20 PTI members for switching party loyalties.
The result means the likely end of a short reign as Punjab chief minister by Hamza Sharif, the prime minister’s son.
Sharif’s daughter Maryam Nawaz, who was leading the poll campaign in the province, said her party accepts defeat as “the decision by masses against them”.