The process is the same as resigning: the employer must cancel your work permit within 10 working days of the employment ending, and you should get your termination certificate as fast as you can to start the next step. Being laid off does not change the cancellation deadline, but it may strengthen your compensation claim.
Nationwide (all cities)
Same cancellation deadline
The cancellation deadline is the same whether you resign or are laid off. Under Article 20 of the Regulations on the Administration of Employment of Foreigners in China, once the employment contract is terminated, the employer must promptly report to the labor and public security authorities, return the foreigner's employment permit and residence permit, and handle the exit procedures. The work-permit service guide puts the cancellation application at 10 working days.
The employer can act unilaterally
Even if you had no time to prepare, the employer can carry out the cancellation unilaterally — it does not need your signature to cancel the work permit, then reports to the exit-entry authority, which can revoke the residence permit without you being present.
Two things to do at once
Two practical points. First, get the termination certificate immediately: it is the anchor document for compensation, unemployment registration, and your next work-permit application. Second, a layoff (involuntary) strengthens your compensation position under Article 46 of the Labor Contract Law, unlike voluntary resignation — so do not sign away that right in the rush.