A five-member Appellate bench led by Chief Justice SK Sinha passed the order on Wednesday, accepting Shafik's appeal against a High Court order.
The court gave him bail for three month or till the police submit an investigation report.
Noted for his satirical columns, Shafik Rehman will have to surrender his passport precluding any possibility of foreign travel during his bail.
On July 17, the Supreme Court allowed the journalist to file an appeal against the High Court order that rejected his bail petition in the case.
The BNP-leaning journalist, a former editor of vernacular daily 'Jay Jay Din', was arrested from his Dhaka residence on April 16 in the case filed in August last year.
Detectives claim to have found some confidential documents regarding Joy from Shafik's residence.
* Shafik saga: An explainer
* Who is Shafik Rehman?
* Journalist Shafik Rehman arrested
* Police: FBI docs found in Shafik Rehman's house
* Taleya: Shafik met Lustyik