Despite growing evidence of public health benefits from urban green space there has been little longitudinal analysis. This study used panel data to explore three different hypotheses about how moving to greener or less green areas may affect mental health over time. The samples were participants in the British Household Panel Survey with mental health data (General Health Questionnaire scores) for five consecutive years, and who relocated to a different residential area between the second and third years (n = 1064; observations = 5320). Fixed-effects analyses controlled for time-invariant individual level heterogeneity and other area and individual level effects. Compared to premove mental health scores, individuals who moved to greener areas (n = 594) had significantly better mental health in all three postmove years (P = .015; P = .016; P = .008), supporting a "shifting baseline" hypothesis. Individuals who moved to less green areas (n = 470) showed significantly worse mental health in the year preceding the move (P = .031) but returned to baseline in the postmove years. Moving to greener urban areas was associated with sustained mental health improvements, suggesting that environmental policies to increase urban green space may have sustainable public health benefits.