Khan has been jailed since August 2023, sidelined by dozens of legal cases he claims were confected to prevent his comeback in elections this year marred by rigging allegations.
Since the February vote his Pakistan Tehreek-e-Insaf (PTI) party has defied a government crackdown with regular rallies, but Tuesday's gathering was by far the largest to grip the capital since the poll.
More than 10,000 protesters had surged in starting at the weekend, defying a ban on public gatherings and a city lockdown to skirmish with 20,000 security forces enlisted to turn them back.
The government said at least one police officer was slain in unrest on Monday, while four state paramilitary officers were also reported killed when protesters ran them over in a vehicle on Tuesday.
The crowds aimed to occupy a public square outside parliament and the prime minister's house.
Overnight, security forces fired tear gas and rubber bullets at protesters wielding sticks and slingshots, as roadblocks were set ablaze.
By early Wednesday AFP staff saw the main thoroughfare towards Islamabad's government enclave cleared of crowds, and security forces in riot gear being bussed away from the area.
Party lodestar
Khan had issued a call from his cell outside Islamabad on Tuesday evening, telling more people to join the crowds.
"All Pakistanis participating in the protest must remain peaceful, stay united, and stand firm until our demands are met," he said in a social media statement released by his party, who often meet him in jail.
The charismatic 72-year-old former cricket star who served as premier from 2018 to 2022 is the lodestar of PTI.
But in his absence the protests were led partially by his wife Bushra Bibi, who was also jailed this year but released last month.
Prime Minister Shehbaz Sharif's government has come under increasing criticism for deploying heavy-handed measures to quash the protests.
Amnesty International said "as protesters enter the capital, law enforcement officials have used unlawful and excessive force".
Khan was ousted by a no-confidence vote after falling out with the kingmaking military establishment, which analysts say engineers the rise and fall of Pakistan's politicians.
But as opposition leader, he led an unprecedented campaign of defiance, with PTI street protests boiling over into unrest that the government cited as the reason for its crackdown.
PTI won more seats than any other party in this year's election, but a coalition of parties considered more pliable to military influence shut them out of power.