In a seven to three ruling, the court banned federal and civil police officers as well as firefighters from going on strike.
Members of the military police were already banned from stopping work.
A stoppage in eastern Espirito Santo state caused chaos in February, with schools closing and public transport suspended as the murder rate shot up.
Police strikes are not uncommon in Brazil and have in the past created problems in major cities such as Rio and Sao Paulo as well as the state of Bahia.
The judges said that anyone working directly in the area of public security had no right to go on strike "in any form or manner" because they carried out "an essential activity for the safeguarding of the public order".
They argued that work stoppages by security personnel "promoted anarchy, which is not allowed under the constitution".
Shortly after the ruling, the union representing federal police officers said its members had voted for nationwide industrial action over a social welfare reform bill.
Union leader Luis Boudens said his members would come up with actions other than stoppages to protest against the bill, such as symbolically handing in their duty weapons and bullet-proof vests.
In February, hundreds of federal police officers and soldiers were deployed to Espirito Santo after the murder rate jumped up during a strike by military and civil police officers over pay and working conditions.
Because military police were already banned under the constitution from going on strike, hundreds of those involved were threatened with charges of rebellion.
A deal was eventually reached and the officers returned to work after three weeks of stoppage.
The Supreme Court in Brazil has ruled that strikes by police are unconstitutional.