Environmental inequalities, such as disproportionate exposure to pollution and climate risks, persist across racial and socioeconomic groups in the United States. A key unresolved question is whether these disparities are driven by sorting (households moving into riskier areas) or siting (the placement of environmental hazards in marginalized neighborhoods). This paper provides causal evidence by leveraging discriminatory lending practices during the 1930s as a natural experiment. Using Residential Security Maps created by the Home Owners’ Loan Corporation (HOLC), we combine machine learning predictions of counterfactual grades for unmapped cities with a spatial difference-in-differences design. Our findings confirm that HOLC maps increased racial segregation in the short and long run, especially in low-income neighborhoods. However, we find no evidence that environmental hazards—such as heat or flood risks—are disproportionately concentrated in treated neighborhoods. These results highlight the fundamental role of sorting, rather than siting, in driving the environmental inequalities observed today.