Everyone returning to Beijing must self-isolate for two weeks to protect against coronavirus otherwise they will be punished, Chinese state media reported.
City authorities, quoted in the Beijing Daily newspaper, said anybody who refuses to quarantine themselves or follow official rules on containing the new coronavirus will be punished - although they did not specify how.
A notice from Beijing's virus prevention working group said: "From now on, all those who have returned to Beijing should stay at home or submit to group observation for 14 days after arriving.
"Those who refuse to accept home or centralised observation and other prevention and control measures will be held accountable under law."
Anybody returning to the Chinese capital will have to submit travel plans to their community in advance, the notice said.
There was no specific mention of foreign visitors arriving from outside China, and how or whether the restrictions would apply to them.
Other major coronavirus updates:
Beijing's announcement came as the World Health Organisation (WHO) said its investigation into the outbreak will start this weekend after the last of 12 WHO experts lands, and will focus on how the new coronavirus is spreading and the severity of COVID-19.
WHO director general Tedros Adhanom Ghebreyesus said the joint mission with China will also seek more details on how, where and when the more than 1,700 healthworkers in China infected so far contracted COVID-19.
Six have died, according to Zeng Yixin, vice director of the National Health Commission.
:: Listen to the Daily podcast on Apple Podcasts , Google Podcasts , Spotify , Spreaker
About 500 million people in China are affected by movement and travel restrictions, as more cities, including Beijing and Shanghai, this week imposed lockdowns in an attempt to halt the spread of COVID-19.
Last week President Xi Jinping warned top officials efforts to contain the virus had gone too far and were threatening the economy.
People returned from the Chinese New Year holiday on Monday, but cities remain empty, with Shanghai and Beijing's streets and subways largely deserted, with many shops and restaurants empty or shut.
Wuhan, the city of 11 million people where the outbreak began, is under the most severe lockdown, with all public transport, taxis and ride-hailing services shut down.
Volunteer drivers are risking their own health by secretly helping to ferry medical staff and those in vital jobs to and from work after responding to requests on messaging groups.
Others are desperately trying to find accommodation for medical workers, many who have come from across China, in hotels that have offered their rooms.