The death toll was highest in Miyun, a suburban district northeast of the city centre, it said.
Also badly affected were Huairou district in the north of the city and Fangshan in the southwest, state media said.
Dozens of roads have been closed, and more than 130 villages have lost electricity, Beijing Daily said.
“Please pay attention to weather forecasts and warnings and do not go to risk areas unless necessary,” the outlet said.
Chinese President Xi Jinping urged authorities to plan for worst-case scenarios and rush the evacuation of residents from flood-threatened areas.
In Hebei province, which encircles the capital, a landslide in a village near the city of Chengde killed four people, with eight still missing, state broadcaster CCTV reported on Monday.
Natural disasters are common across China, particularly in the summer when some regions experience heavy rain while others bake in searing heat.
China is the world’s biggest emitter of the greenhouse gases that scientists say drive climate change and contribute to making extreme weather more frequent and intense.
But it is also a global renewable energy powerhouse that aims to make its massive economy carbon-neutral by 2060.
Flash floods in the eastern Shandong province killed two people and left 10 missing this month.
A landslide on a highway in Sichuan province this month also killed five people after it swept several cars down a mountainside.
-Agence France-Presse