Labourers from Cambodia, Laos and Myanmar play a key role in Thai industries such as seafood, agriculture and construction, but they often lack official work permits.
On Wednesday Thailand's military regime, which seized power in a coup on May 22, had threatened to arrest and deport all illegal foreign workers.
"They're returning en masse like a dam collapsing. They've never come en masse like this before in our history," Kor Sam Saroeut, governor of northwestern Banteay Meanchey province where the main Cambodian-Thai border crossing is located, told AFP by telephone.
"They said they are scared of being arrested or shot if they run when Thai authorities check their houses," Saroeut added. "Most of them went to work in Thailand without a work permit."
More From This Section
The mass exodus comes after Thai army spokeswoman Sirichan Ngathong on Wednesday said the junta viewed illegal workers as a "threat".
"We see illegal workers as a threat because there were a lot of them and no clear measures to handle them, which could lead to social problems," she said.
Chea Thea, a 33-year-old construction worker, said she returned to Cambodia two days ago as part of a convoy of 20 cars organised by Thai authorities -- deciding to leave after seeing her compatriots were departing in large numbers.
"Cambodian migrants are coming back. We feel scared," she said from her parents' home in northwestern Battambang province.
"When the situation is better I may go back," Thea said.
Thai military officials were not immediately available for comment on the mass exodus.