Previous attempts had ended in near misses. In March, a court order to detain him was thwarted by pitched battles between his supporters and police outside his home in Lahore.
His arrest, which happened while he was in court in the capital Islamabad, was no less dramatic. The 70-year-old is barely visible among a swarm of officers in riot gear as they escort him outside and bundle him into a vehicle.
Mr Khan has faced dozens of charges, from corruption to sedition, since he was ousted after losing a confidence vote last year. So his arrest is not unexpected.
But it has enraged his supporters and even shocked a country that was hoping for an end to the political stand-off that has pushed Pakistan to the brink.
Pakistan's government says he was taken into a custody for not co-operating with authorities in an ongoing corruption investigation.
The case alleges that Mr Khan, while he was the PM, received land as a bribe in exchange for political favours. It revolves around an investigation conducted by Britain's National Crime Agency into "laundered" money by Pakistan's biggest property tycoon Malik Riaz Hussain.
Mr Hussain allegedly gave the land to the Al-Qadir Trust, which was set up by Mr Khan's third wife, Bushra Bibi. Mr Khan, who denied the charges, said that the land had been donated for charitable purposes.
Mr Hussain denied laundering money. But his position on the question of land for favours is not known - he appeared before Pakistan's National Accountability Bureau investigators earlier this year and recorded a statement in the Al-Qadir Trust case, but it has not been made public or reported in the media.
Since his arrest Mr Khan has been indicted in another graft case. This one alleges he did not disclose money he earned by selling gifts he had received on foreign visits as PM. A hearing in this case saw charges pressed for the first time against Mr Khan on Wednesday and he pleaded not guilty.
Analysts believe that now that he is in custody, courts might indict him in a series of cases - a fate he has repeatedly avoided by either missing the appointment, or appearing in higher courts, heavily guarded, only to apply for protective bail. He was, in fact, in court on Tuesday to seek protective bail against arrest when he was finally whisked off into custody.
Mr Khan himself seemed to have been prepared for it. After he was detained, he released a video that had been recorded earlier, saying it was likely he would be arrested by the time his supporters saw the message.
But it's possible neither he nor his lawyers expected him to be arrested on the court premises because Mr Khan has appeared in court for bail before. But this time the executors of the warrant were not police, but a paramilitary force, the Punjab Rangers.
Leaders and supporters of Mr Khan's Pakistan Tehreek-e-Insaf (PTI) party argue this is proof of the army's involvement. They say the arrest has little to do with corruption charges and everything to do with Mr Khan's ongoing public battle with the army. He has accused the army and the spy agency, the Inter-Service Intelligence (ISI), of conspiring to assassinate him - he survived a shooting last year.
The country's generals, who have seized power three times since Pakistan's independence in 1947, have long played a prominent role in politics. Mr Khan too was believed to have their support as he rose to power. But the privilege of his birth, his fame born of cricketing glory, and his charisma drove his popularity far higher than anything Pakistan has seen in recent years.
When he was ousted as PM, many believed it was as much the result of his poor track record in office, as it was a falling out with the army. But he quickly went on the offensive, criticising the army and embracing a populist narrative that resonated with people. And he did this loudly, holding rallies and marches that drew massive crowds and campaigning for local elections, most of which his party went on to win.
This continued for months even as Mr Khan managed to evade arrest. Then he publicly accused an intelligence official of trying to assassinate him. Infuriated army officials denied the charge, and just the day before his arrest, warned him not to repeat it.
Now, with the military's gloves off, Mr Khan's supporters say the army has crossed a "red line" - that of the former PM himself. And as public anger turns against the army, Pakistan is witnessing an unprecedented moment.
In a statement the military said 9 May would be remembered as "a dark chapter" and warned of an "extreme reaction" if protesters carried out more attacks on military and other state installations.
The uncertainty surrounding Mr Khan has paralysed Pakistan for months.
The nuclear-armed state of 231 million people is already battling soaring food prices, a long-running economic crisis and extremist violence. Talks with the IMF over a much-needed bailout have stalled, and elections, due this year, are also caught in the political stalemate.
Analysts believe that Mr Khan's arrest only adds to the growing instability and diminishes any chance of a resolution between the former PM and the establishment, be it the government or the army.
The 13-member coalition which is in power - led by Prime Minister Shabaz Sharif - says it has "nothing to do with the arrest", which followed due process.
But others say Mr Khan's arrest benefits the government because if he is found guilty, he would be disqualified from contesting elections, possibly for life.
Mr Khan's rise to the top of Pakistani politics was almost as meteoric as his sporting career. He even managed to recast himself from a playboy cricketing icon into a pious politician as he sought the top job in the country.
But the army - which many believe had allied with him on his route to the PM's chair, despite denials from both parties - now appears to be on the other side.
What that means for Mr Khan and Pakistan is still unclear because the country finds itself in uncharted waters.