Good health and well-being are key to achieving the main goals of the UN Sustainable Development Goals (SDGs), especially after the outbreak of the COVID-19 epidemic. What is a concern for both government and society is how to understand the spatial match of hierarchical healthcare facilities and residential areas in terms of quantity and capacity, to meet the challenges of various diseases and build a healthy life. Using hierarchical healthcare data and cellphone signaling data in Beijing, China, we used the kernel density estimation, a bivariate spatial autocorrelation model, and a coupling index to explore the spatial relationships between hierarchical healthcare facilities and residential areas. We found large numbers of both healthcare facilities and residential areas in the urban center, and small numbers of both at the urban edge. The hospitals and designated retail pharmacies in the densely populated areas do not have enough capacity to meet the need of the population. In addition, the capacity of primary healthcare institutions can meet people’s needs. Our findings would serve as a reference for urban planning, optimization of hierarchical healthcare facilities, and research on similar themes.