Brazil is scheduled to face Venezuela in Copa America's opener on Sunday at the Mané Garrincha stadium in the capital, Brasilia. The final will take place July 10 at the Maracana stadium in Rio de Janeiro.
The court's ruling is a response to challenges made by the Brazilian Socialist Party and a metalworkers union lodged against Brazil hosting the tournament.
"Intense circulation of visitors in national territory will obviously spread COVID-19 in several states, as well as potentially allow entry of new variants," the party said in its request.
The union said no international sports events should take place as long as social distancing policies are in place.
Brazil is still suffering one of the world’s highest daily COVID-19 infection rates, although the number of deaths has been declining for about two months from its record high.
Bolsonaro has staunchly supported Brazil hosting Copa America since South American soccer body CONMEBOL made a last-minute plea. He has railed against shutdown measures aimed at preventing the virus' spread and claimed their economic impact kills more than the virus.
Justice Carmen Lúcia argued in her vote that only state authorities can permit or prohibit Copa America from taking place locally, and her colleagues agreed.
"The Supreme Court can act in accordance with the guidance of the constitution and current legislation. Judges cannot act as they wish nor as they desire," said Lúcia, who has previously criticized the Bolsonaro administration's decision to host the event. She added that neither Bolsonaro nor any sports body can overrule the decisions of state authorities.
The tournament will be played in the states of Rio de Janeiro, Goias, Mato Grosso and the country’s Federal District. Several other states rejected hosting matches of the tournament.