Police said the detainees broke out of the hall where they were being held at around 2am.
It was being used to house 25 suspected Uighurs, five of whom did not escape.
Songkhla police are now trying to locate the missing ones.
The 25 had been found among a large group of Uighurs at the Tone Nga Chang waterfall in Songkhla in 2015. They claimed to be Turkish and wanted to travel to Turkey.
Most of them were deported to China but the 25 detainees insisted on travelling to Turkey instead. At the time of their escape their nationalities had still not been verified.