Spatial heterogeneity analysis of housing prices, in general, is crucial for maintaining high-quality economic development in China, especially in the post-COVID-19 pandemic context. Previous studies have attempted to explain the associated geographical evolution by studying the spatial non-stationary continuous heterogeneity; however, they ignored the spatial discrete heterogeneity caused by natural or policy factors, such as education, economy, and population. Therefore, in this study, we take Beijing as an example and consider educational factors in order to propose an improved local regression algorithm called the regionally geographically weighted regression affected by education (E-RGWR), which can effectively address spatial non-stationary discrete heterogeneity caused by education factors. Our empirical study indicates that the R2 and R2adj values of E-RGWR are 0.8644 and 0.8642, which are 10.98% and 11.01% higher than those of GWR, and 3.26% and 3.27% higher than those of RGWR, respectively. In addition, through an analysis of related variables, the quantitative impacts of greening rate, distance to market, distance to hospitals. and construction time on housing prices in Beijing are found to present significant spatial discrete heterogeneity, and a positive relationship between school districts and housing prices was also observed. The obtained evaluation results indicate that E-RGWR can explain the spatial instability of housing prices in Beijing and the spatial discrete heterogeneity caused by education factors. Finally, based on the estimation results of the E-RGWR model, regarding housing prices in Beijing, we analyze the relationships between enrollment policy, real estate sales policy, and housing prices, E-RGWR can provide policy makers with more refined evidence to understand the nature of the centralized change relationship of Beijing’s housing price data in a well-defined manner. The government should not only carry out macro-control, but also implement precise policies for different regions, refine social governance, promote education equity, and boost the economy.