The northern city of Tianjin began testing the population of around 14 million on Sundays after at least two local cases Omicron were detected, government media reported.
People in four districts will be tested for the next 24 hours while other districts will be tested the next day, the Tianjin government said.
Residents will only get the green health code needed to travel once they receive negative results, he said.
The city advised people not to leave the city for unnecessary reasons.
So far there is no full locking order given.
The outbreak raises the risk for Beijing and the upcoming winter Olympics, because of the many commuters who work and live in both cities.