Judge Sergio Moro’s injunction said there was a risk a federal investigation could be derailed if Luiz Inacio Lula da Silva was a minister.
In Brazil, cabinet members can only be investigated by the Supreme Court, not by federal courts.
Luiz Inacio Lula da Silva is under investigation in connection with a corruption scandal.
Prosecutors filed charges against the former president last week accusing him of money laundering and fraud, which he has denied.
Luiz Inacio Lula da Silva’s nomination as chief of staff has divided Brazilians.
Some said it was a move to shield him from prosecution while others welcomed his return to active politics.
Ahead of the former leader’s swearing-in ceremony, groups of supporters and opponents of the government clashed outside the presidential palace.
The ceremony itself was interrupted by a protester who cried “Shame!”.
The protester was drowned out by supporters of the governing Workers’ Party, who shouted pro-government slogans and Lula’s name.
During the ceremony, President Dilma Rousseff praised Luiz Inacio Lula da Silva, who she said was “not just a great politician, but a great friend and comrade of many battles”.
“We’ve always stood side by side,” she said.
A visibly angry Dilma Rousseff then criticised federal Judge Sergio Moro, who is leading the investigation into a massive corruption scandal at state-oil giant Petrobras.
On March 16, Judge Sergio Moro made public a taped phone conversation between President Dilma Rousseff and Luiz Inacio Lula da Silva which has been interpreted by some to show that Lula was given the post of chief of staff to shield him from prosecution.
In the conversation, Dilma Rousseff told her predecessor and mentor she would send him the official decree naming him as minister “just to use in case it’s necessary”.
The Brazilian president said Judge Sergio Moro had violated the law and the constitution by releasing the tape and that she would order an investigation.
Dilma Rousseff herself is under considerable political pressure.
Her critics want to impeach her over allegations she manipulated Brazil’s account books to hide a growing deficit.
Analysts say she named Lula chief of staff so he could use his influence with members of Congress to convince them to vote against her impeachment.
As more and more members of her Workers’ Party are being investigated over corruption at Petrobras, she is also facing increased questions about what Dilma Rousseff may have known.
Dilma Rousseff was head of the board at Petrobras from 2003 to 2010 and has always denied any wrongdoing.
On March 13, a record number of people took part in anti-government marches across Brazil.
An estimated three million people called for an end to corruption and for Dilma Rousseff’s impeachment.
There have also been rallies in support of the government, but they have been smaller than those opposing the administration.
The political upheaval comes at a time of economic problems, with Brazil going through its worst recession in more than three decades.
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…