Isa Muazu, 45, from the northeastern Nigerian city of Maiduguri, came to Britain in 2007 and claimed asylum saying that the Islamist group Boko Haram was trying to kill him.
He has challenged Interior Minister Theresa May's decision to keep him in detention and has been on hunger strike for 90 days.
Three judges yesterday unanimously ordered an urgent full hearing of the case next Monday.
But they refused to direct his release from the Harmondsworth immigration removal centre near Heathrow Airport in west London until the hearing.
Also Read
But the judge said Muazu had chosen not to eat, saying "that is his prerogative and we do not think he is entitled to interim relief".
Muazu entered Britain in July 2007 on a visitor's visa but did not leave when it expired in January 2008, and found work in London.
He said he sought asylum after members of Boko Haram threatened to kill him unless he joined them and claims two members of his family have been killed by the group.