With only six hours until the ban took effect, pictures of empty supermarket shelves and Chengdu residents frantically stockpiling food quickly went viral on social media.
China is the final major economy to adhere to a zero-COVID policy, which uses mass testing, immediate shutdowns, and extended quarantines to put an end to viral outbreaks.
In order to battle a new wave of infections, Chengdu, in the southwest, became the most recent city to declare a shutdown, stating in an official notice that citizens must “stay home in principle” starting at 6pm (10:00 GMT) on Thursday.
Each household will be allowed to send one person out to buy groceries and essential goods per day, provided they have tested negative in the previous 24 hours, it said.
All residents will be tested for the virus by Sunday, and it urged them not to leave the city unless “absolutely necessary”.
“The current state of epidemic control is abnormal, complex and grim,” the announcement said, adding the measures aimed to “decisively arrest the spread of the outbreak and guarantee the health of all citizens”.
Chengdu recorded 157 new local infections on Thursday, of which 51 displayed no symptoms, the city government said in a separate notice.
Children in at least 10 cities and provinces across China face disruptions to their new academic year as pandemic controls force schools to switch to online learning, according to a report in state-affiliated media.
Xining, the capital of western Qinghai province and home to 2.5 million people, rolled out a mass-testing drive and told residents in its main urban area to work from home for three days.
China has stuck to its zero-tolerance virus strategy despite concern the approach is stifling its economy.
Last month, travellers in the southern island province of Hainan protested after more than 80,000 tourists were stranded in a resort city because of a COVID-19 flare-up.