AimEvidence on the association between natural-built environments and depression is largely derived from the general population and prone to residential self-selection bias because of the nature of cross-sectional research design. Despite emerging adulthood, which includes the university years, is a critical stage for forming life-long health habits, studies on this topic focusing on undergraduate students are limited. The current study aims to illustrate the underlying mechanisms for how the campus-based environments affect depression in undergraduate students.MethodsBased on a nationwide representative analytical sample of 22,009 Chinese undergraduates in 2018, we examined participants' reports of depression and campus-centered natural/built environments within multiple buffer sizes including 0.5, 1.0, and 2.5 km. After disentangling residential self-selection, we explored the moderating role of the socioeconomic attributes of undergraduates. The depression outcome was measured by the nine-item Patient Health Questionnaire (PHQ9). Indicators of exposure to green and blue space, transportation infrastructure, and food environments were objectively assessed using different circular buffers around each campus address.ResultsModeling results indicated that campus neighborhoods with more scattered trees (0.5 km), water (0.5, 1.0, and 2.5 km), and street intersections (1.0 and 2.5 km) were protective against depression. In contrast, those living near denser distributions of outlets serving take-away sweets and fast food (0.5, 1.0, and 2.5 km) were susceptible to depression. These associations were modified by undergraduates' socioeconomic attributes (e.g., grade, Hukou status, and ethnicity) and varied according to geographical scales and exposure metrics.ConclusionTo deliver effective environmental interventions to curb the prevalence of depression among undergraduate students, further planning policies should focus on the careful conception of the campus-based environment, especially regarding different spatial scales.