Beijing is facing rapid population aging. Residential care plays an increasingly important role in the care for the elderly people. It is of great importance to optimize the layout of residential care facilities to ensure equal and reasonable access, which has scientific and practical implications. This study first forecasted the spatial distribution of the elderly population under natural growth in 2020 in Beijing. Second, a spatial optimization model was established to maximize equity in access to residential care facilities. The Particle Swarm Optimization algorithm was used to solve the optimization model. As the results show, the elderly population aged 60 or older will reach 4.37 million in 2020 in Beijing, among which 7.9%, 50.2%, 30.1%, and 11.8% of the total elderly population will be located in the Capital Core Functional Area, Urban Functional Extension Area, Urban New Developing Area, and Ecological Protection Area, respectively. By contrast, 2.7%, 32.7%, 48.5%, and 16.1% of the total residential care facility (RCF) beds will be located in the Capital Core Functional Area, Urban Functional Extension Area, Urban New Developing Area, and Ecological Protection Area, respectively when optimized . The optimized RCF layouts improve spatially equal access to residential care resources with very low accessibility standard variation (0.0026), while the accessibility standard variation of actual layouts is 8 times (0.0207) that of the optimized results. In the layouts with maximum equity in access, only a portion of the demands for residential care in the Capital Core Functional Area and Urban Functional Extension Area will be met locally. The residential care resources in the Urban New Developing Area will meet both the local demands and the demands from the two functional areas in the central city. The Ecological Protection Area, however, mainly provides residential care services for the local elderly population. The optimized results of this study correspond to the “Special Plan for the Development of Residential Care Facilities in Beijing,” which also conforms to the reality that the land resources are in shortage in the central city and the physical environment in the suburb is more pleasant for the elderly people. The results of this study will support knowledge-based policy-making and planning of residential care facilities. The methods introduced in this study can also be applied to the spatial optimization of other types of public service facilities.