Psychiatric morbidity is high in cities, so identifying potential modifiable urban protective factors is important. We show that exposure to urban green space improves well-being in naturally behaving male and female city dwellers, particularly in districts with higher psychiatric incidence and fewer green resources. Higher green-related affective benefit was related to lower prefrontal activity during negative-emotion processing, which suggests that urban green space exposure may compensate for reduced neural regulatory capacity.