About 300 troops have been sent to the northern city of Fortaleza to tackle a surge in criminal violence, authorities said.
Soldiers will patrol there and across the state of Ceará in a bid to halt attacks on shops, banks and buses.
The justice ministry ordered the special deployment after dozens of attacks this week.
The attacks are a protest against new, tougher measures in local prisons, largely controlled by criminal gangs.
Prison authorities in the state have blocked mobile phone signals inside jails and ended a policy of separating inmates by gang affiliation.
The troop deployment comes just days after the inauguration of President Jair Bolsonaro, who was elected to office on the promise to fight rampant crime in the country.
Mr Bolsonaro reportedly praised Justice Minister Sergio Moro’s decision to send in troops as “apt, rapid and effective”.
Mr Moro previously led a vast investigation into Brazilian corruption known as Operation Car Wash.