Protesters also want a new constitution, to replace on drafted under military rule
Thai police used water cannon and pushed forward with riot shields and batons on Friday to try to disperse thousands of protesters who defied a ban on protests for a second day and in spite of a warning from Prime Minister Prayuth Chan-ocha.
Protesters pushed back, some with umbrellas. A few threw plastic bottles at the police in full riot gear.
"Get out, get out," the protesters chanted as police used the heaviest force yet to stop three months of protests that have challenged King Maha Vajiralongkorn's monarchy as well as demanding the removal of Prayuth, a former military ruler.
A ban on gatherings of more than five people was imposed on Thursday.
A protest sign read "Release our friends" - a reference to the arrest of more than 40 protesters, including several of their leaders, as a government crackdown has intensified this week.
Prayuth first took power as army chief in a 2014 coup. Critics say he engineered a general election last year to keep hold of power as a civilian prime minister. He says the election was fair.
Protesters also want a new constitution, to replace one drafted under military rule.
"I'm not quitting," Prayuth told reporters after an emergency cabinet meeting, adding that emergency measures would be in force for up to 30 days. He warned people not to violate them, saying: "Just wait and see ... If you do wrong, we will use the law."
Calls have also built up among protesters for reforms to the monarchy, which is accused by protesters of helping to entrench decades of military influence in politics.
Protests have been largely peaceful.
The only specific incident cited by the government for the imposition of emergency measures was one in which Queen Suthida's motorcade was jeered by protesters, but it also said protests were damaging the economy and national security.
Police said on Friday that two men would be charged with attempted violence against the queen, which carries a possible death sentence if her life is thought to have been threatened. Even if not, the charge can mean life in jail.
The UN High Commissioner for Human Rights was concerned about the situation in Thailand, said Ravina Shamdsani Said, a spokeswoman for commissioner Michelle Bachelet.
Thai parliamentary opposition parties condemned the emergency measures.