As urbanization accelerates worldwide, understanding the impact of urban expansion on habitat quality has become increasingly critical in environmental science research. This study examines the impact of urban expansion on habitat quality in Beijing, forecasting land cover changes and ecological effects by 2030. Using CA–Markov and FLUS models, the research analyzes habitat quality from 2000 to 2030 through the InVEST model, revealing a significant urban land increase of 1316.47 km2 and a consequent habitat quality decline. Predictions for 2030 indicate varying habitat quality outcomes across three scenarios: ecological priority (0.375), natural growth (0.373), and urban development (0.359). We observed that the natural growth scenario forecasts a further decline in habitat quality, primarily due to increased low–value habitat regions. Conversely, the ecological priority scenario projects a notable improvement in habitat quality. To mitigate habitat degradation in Beijing and enhance regional habitat quality and ecological conditions, it is recommended to control urban land cover expansion, adopt effective ecological conservation policies, and systematically carry out national spatial restructuring and ecological restoration. This research provides vital decision–making support for urban planning and ecological conservation, emphasizing the need for comprehensive land cover and ecological strategies in urban development. Additionally, our findings and methodologies are applicable to other rapidly urbanizing cities worldwide. This demonstrates the broader applicability and relevance of our research, providing a framework for sustainable urban planning in diverse global contexts.