The Federal High Court sitting in Abuja has given the Department of State Services, DSS, 24 hours within which to release Omoyele Sowore.
The order was given on Thursday.
Sowore, who is the convener of Revolution Now, a protest against the Federal Government, has been detained since August.
He was charged for treasonable felony among other crimes.
Although the court had ordered his release, having met the bail conditions, the DSS is yet to set him free several weeks after.
Giving the order for his release, Justice Ijeoma Ojukwu also awarded a N100,000 fine against the DSS.
The fine was for the delay to serve the defence counsel with the additional proof of evidence in the ongoing trial of Sowore and Olawale Bakare.