The housing price-to-income ratio is an important index for measuring the health of real estate, as well as detecting residents’ housing affordability and regional spatial justice. This paper considers 1833 residential districts in one main urban area and three secondary urban areas in Nanjing during the period 2009–2017 as research units. It also simulates and estimates the spatial distribution of the housing price-to-income ratio with the kriging interpolation method of geographic information system (GIS) geostatistical analysis and constructs a housing spatial justice model by using housing price, income, and housing price-to-income ratio. The research results prove that in the one main urban area and the three secondary urban areas considered, the housing price-to-income ratio tended on the whole to rise, presenting a core edge model of a progressive decrease from the Main Urban Area to the secondary urban areas spatially, with high-value areas centered around famous school districts and new town centers. The housing spatial justice degree presented a trend opposite to that of the housing price-to-income ratio pattern; it progressively decreased from the secondary urban areas to the Main Urban Area. Furthermore, the spatial justice degree tended to decrease in the new towns, in the periphery of the Main Urban Area, and in the secondary urban areas, and it tended to rise, relatively, in the inner urban areas. The enhancement of the housing price-to-income ratio has caused the urban housing spatial justice degree to become gradually imbalanced, gradually squeezing out the poor and vulnerable groups to urban fringe areas and leading to a phenomenon of middle class stratification. This has thus aroused social problems such as housing differentiation and class solidification, etc., and has caused inequality in social spaces. Tt is therefore urgently necessary to reflect on urban space production with the value and principle of spatial justice, which is also the only way to obtain urban sustainable development, in mind.