Haneef's lawyer Peter Russo said he would appeal against the decision.
"We will start the next battle. If that's the way they want to do it -- bring it on," he was quoted as saying by The Australian on Monday.
Russo said his client had remained calm when he was told of the new development.
A Brisbane magistrate on Monday morning granted bail to Haneef, but Immigration Minister Kevin Andrews stepped in before he could be released by revoking his work visa.
Haneef will be transferred from detention in Brisbane to the Villawood Immigration Detention Centre in Sydney as soon as arrangements can be made, Andrews said.
The Australian Civil Liberties Council on Monday afternoon attacked Andrews' decision, saying the federal government was undermining the independence of the court system by revoking the visa after a magistrate granted him bail.
The Council's Secretary Cameron Murphy said the government was undermining the independent court system.
"Because the government doesn't like the decision of the court to grant bail they just relied on a technicality of the immigration legislation to lock him up," Murphy said adding, "the reason we have an independent court system is so these incredibly important decisions are made for the right reasons, and aren't subject to political interference."
"It is not appropriate for the government to just keep him incarcerated because they don't like the decision of the magistrates court," Murphy added.
He said it was not the first time the government had acted in such a way, likening it to the case of Melbourne man Jack Thomas, who last year had a control order placed on him days after the Victorian Court of Appeal quashed his terrorism-related convictions.
Murphy said if Andrews had genuinely believed Haneef was of bad character he should have cancelled his visa when he was first apprehended two weeks ago.
"I suspect that if the magistrate had denied bail and he was remanded in custody, the immigration minister wouldn't have even bothered revoking his rights under immigration law," he said.
Murphy said if the government has more information that links Haneef to terrorism the appropriate thing to do would be to apply to the court to have his bail revoked.
Russo was scathing of Andrews' claim that Haneef "had or has an association with persons involved in criminal conduct namely terrorism."
"I've been trying to avoid the political debate, but maybe it's landed on my doorstep and maybe it's time I took them on," Russo said.
Caption: Solicitor Peter Russo, representing Mohammed Haneef, speaks to media persons outside the Brisbane Street Magistrates Court on Monday.
Photograph: Getty Images
Glasgow Blasts: The Indian Connection
Court artist sketch of Mohammed Haneef