ALMATY, Kazakhstan — The businesses he started had failed, and he had a wife and two children to support. So when the authorities in China’s far western Xinjiang region offered him a job with the auxiliary police, Baimurat welcomed the good pay and benefits.

For months, he stood at roadside checkpoints, looking for people on the government’s blacklist, usually from Muslim ethnic minorities. As a Kazakh Muslim himself, he sometimes felt uncomfortable about his work, but he needed the money.

Then he was asked to help bring 600 handcuffed people to a new facility — and was stunned by what he saw. Officials called it a job training center, but it was basically a prison, with toilets and beds behind bars. One detainee was an acquaintance he barely recognized because he had lost so much weight.

Mr. Baimurat, 39, suppressed his emotions.

“There are cameras everywhere,” he recalled, “and if they see you look unhappy, you will be in trouble.”