Beijing sealed off 10 areas of its northeastern Shunyi district on Tuesday, the first lockdown in the Chinese capital since the last coronavirus outbreak in July.
The city has reported 16 infections and three asymptomatic cases since December 18, when the first cases were found.
Most of the cases were in Shunyi, which has banned couriers from entering residential compounds.
Six villages, three buildings and one industrial zone were among the areas locked down, a Beijing municipal official told a news conference.
While Beijing's new cases are modest in number compared with June and July, municipal authorities have beefed up steps to rein in the coronavirus, which has surfaced in three districts, where hundreds of thousands of residents have been tested.
"The capital's COVID prevention and control (efforts) need to initiate emergency mode," a city spokesman said at the news conference.
The Beijing government said it was cancelling large-scale gatherings such as temple fairs and sporting events, and controlling the size of offline events such as annual parties.
On Sunday, it said it would increase the number of carriages in the metro system to spread out commuters, and limit attendance at scenic spots and entertainment venues to 75 per cent of capacity.
Live music events have been cancelled and a New Year's Day light show called off. Educational institutions, from primary schools to the prestigious Tsinghua University have barred unnecessary entry of outsiders.
Students of primary schools and some from middle schools will also start winter holidays by up to two weeks earlier next month, a peak travel period before the Lunar New Year in mid-February.
Beijing has also urged residents to stay home during the holidays, with officials in its northern district of Yanqing turning on loudspeakers to advise residents not to travel outside the region.


US war in Iran has cost $29 billion so far, Pentagon says
At Temple of Heaven summit, Trump and Xi will seek a good harvest
Peace deal hopes fade after Trump rejects Iran proposal
Protests erupt after key college entrance test cancelled in India
UK's Starmer defies calls to quit, says he is getting on with governing
New Israeli law sets military tribunal for those linked to October 7 attack
Russia strikes Ukraine with drones as ceasefire ends
Dutch hospital quarantines 12 over breach of hantavirus protocol
