He had remained inside for hours after being granted bail, saying he was not being allowed to leave by security officials.
It's not the security agencies, it's one man – the army chief," he said, without naming him.
He has since been a vocal critic of current army chief General Asim Munir.
[1/7] Security officers escort Pakistan's former Prime Minister Imran Khan, as he appeared in Islamabad High Court, Islamabad, Pakistan May 12, 2023.
"The Islamabad High Court has given a two-week bail and also ordered the (anti-graft body) not to arrest Imran Khan during this period," another of Khan's lawyers, Faisal Chaudhry, told Reuters.