It is not clear how long the new measures will last, but the announcement comes as the city begins a five-day public holiday.
Proof of a negative Covid test will also be required to board public transport from 5 May.
China is battling a resurgence in Covid cases.
In contrast to many other countries, China is pursuing a zero-Covid strategy with the aim of eradicating the virus from the country completely.
But the measures, such as strict lockdowns, have led to rare shows of public anger against the authorities.
Beijing’s new rules come days after the city launched mass testing for its millions of residents following a spike in cases.
All dining in restaurants will also be halted between 1 and 4 May, with people being asked to cook at home.
The city has reported 295 new cases since 22 April.
Of these, 123 cases were found in the Chaoyang, Beijing’s most populous district, which is now set for three rounds of mass testing.
The streets of Beijing were quiet at the start of the five-day Labour Day break. One female resident, a finance worker, started to cry as she told Reuters how she felt.
“You look at a city that used to be crowded and now is empty. And you can’t help but wonder how these people manage to survive,” she said.
Earlier this month residents rushed to stock up essential supplies and long queues were seen outside supermarkets and shops, despite government assurances there is sufficient food.
There are fears the city could face a similar situation to Shanghai, which has seen 25 million people shut in their homes for weeks and left some struggling to find food and other basics.
Since the outbreak began in early March, more than 500,000 people in Shanghai have tested positive for the virus.
But the city reached a milestone on Saturday, recording no new daily Covid cases outside of quarantine areas.