The bench of Justice SM Kuddus Zaman and Justice KM Zahid Sarwar Kazal gave the order.
Lawyer Khurshid Alam Khan represented the Anti-Corruption Commission (ACC) while lawyer Masudul Haque stood for Shahed.
In 2020, ACC deputy director Md Shahjahan Miraj filed a case against four people, including Shahed.
The ACC will appeal before the Appellate Division of the Supreme Court challenging the High Court order, Khurshid said.
Also, Shahed, who was arrested in several other criminal cases, cannot be released from jail, he added.