The verdict was given on a plea of his Pakistan Tehreek-e-Insaf (PTI) party saying that the arrest was illegal as it was made at the premises of the Islamabad High Court (IHC) when Khan was seeking protective bail.
The Supreme Court said Khan could reapply for protective bail on Friday and directed the Islamabad Police to keep the former Prime Minister in a guest house at police headquarters until then.
The judges also directed the police to let Khan meet with his family members, lawyers and friends during his stay in the guest house.
WATCH: Former Prime Minister of Pakistan���� Imran Khan details the US'���� role in the plot to depose him last year
"The nation of Pakistan welcomes the decision of the Supreme Court which annulled the arrest of Imran Khan," the PTI party said on Thursday.
The 70-year-old politician was detained on Tuesday by security forces for a corruption case when he went to court to request bail for another case against him. The PTI responded to his arrest by calling on all of his supporters to take to the streets to protest.
The massive protests led to attacks on military headquarters, state institutions and officers' residences. At least 10 civilians have been killed and over 1,750 others injured since Tuesday.
Due to aggressive baby formula advertising, 38% of babies in Pakistan are breastfed. But Pakistani mothers are now embracing breastfeeding. pic.twitter.com/nQ0121XXag