Bolsonaro has been arrested after authorities found he posed a serious risk of fleeing while under house arrest.
The ex-president was convicted of orchestrating a military coup in September and given more than a 27-year term in jail, but he continued under confinement pending court reviews.
Top Judicial Official Justice Moraes said the move to detain the 70-year-old politician was a preventative measure after recent developments were revealed.
This encompassed trying to remove his electronic bracelet and a invitation to a supporters' gathering that could facilitate a chance to flee".
In a document approving the detention, the magistrate said data from the facility tracking the former president's confinement suggested the ex-president's "intention to break the surveillance device to guarantee victory in his flight.
This, it said, would be "facilitated by the disorder caused by the gathering called by his child.
His offspring, Flávio Bolsonaro, who works as a legislator, called for a assembly of his backers near his father's house to take place on the weekend.
The senator wrote on social media on last Friday: Will you battle for your country, or see it all from your mobile device there on your settee? I urge you to battle with us."
He said the vigil would be so followers could seek divine intervention for his well-being and for the return of democracy in our country."
Part of the magistrate's decision was the possibility of Bolsonaro's "relocation to diplomatic missions near the residence, considering that the inquiries revealed a history of organizing to ask for protection through a diplomatic representation", a statement said.
The legal document highlights that the US embassy in the national capital, Brasilia, is located around 13km from Bolsonaro's home.
The former president's legal troubles have drawn the ire of fellow conservative nationalist United States President Trump, leading him to enact a 50% tariff on goods coming from Brazil.
Bolsonaro is being kept in a Federal Police station in Brasilia and will have a imprisonment assessment on Sunday.
It was only on Friday that the ex-leader's attorneys asked the High Court to permit him to fulfill his full incarceration period under house arrest, with digital surveillance.
They also asked that he be authorized to leave his home for medical care, saying he needed frequent medical attention for respiratory ailments and other health problems.
He was convicted of orchestrating a scheme aimed at retaining his authority after he lost the national vote to his left-wing rival, President Lula.
Top judicial officials said that he had knowledge of a plan which encompassed plans to murder Lula and his VP candidate, Alckmin, and to imprison and murder the presiding judge - the Supreme Court justice who has been overseeing Bolsonaro's trial.
The conspiracy was stopped because it couldn't obtain the support of the military leaders. Lula was took office without issue on the first day of 2023.
But a following week, on 8 January, thousands of Bolsonaro supporters invaded and destroyed official structures in the national capital, the capital city.
The law enforcement took action and around approximately 1,500 persons were arrested.
The magistrates found that the rioters had been provoked by the former president whose strategy, they said, was for the Brazilian military to step in, bring back stability and return him to office.
At the moment, the legal team called the 27 years and three months sentence extremely harsh.
He was also banned from seeking elected position until twenty-sixty - a decade minus two years after the completion of his term.
The ex-leader called the legal proceedings a political persecution and said it was designed to prevent him participating in the 2026 national vote.
Award-winning journalist specializing in digital media trends and cultural analysis, with over a decade of experience in UK news reporting.