Pakistan's supreme court ordered the release of former Prime Minister Imran Khan, saying the arrest is illegal, GEO TV has reported.