Mental health is an exceedingly prevalent concern for the urban population. Mounting evidence has confirmed the plausibility of high incidences of mental disorders in socioeconomically disadvantaged neighborhoods. However, the association between the neighborhood built environment and individual mental health is understudied and far from conclusive, especially in developing countries such as China. The underlying mechanism requires in-depth analysis combining potential intermediates such as perceived environmental disorder and supportive social relationships. Using a health survey conducted in Beijing in 2017, this study investigates for the first time a socio-environmental pathway through which perceived disorder and social interaction account for the relationship between the built environment and mental health under the very notion of the neighborhood effect. The results from multilevel structural equation models indicate that individual mental health is influenced by the neighborhood-scale built environment through three pathways, independent of neighborhood socioeconomic disadvantages: (1) proximity to parks is the sole indicator directly linked to mental health; (2) population density, road connectivity and proximity to parks are indirectly associated with mental health through interactions with neighbors; and (3) population density, road connectivity and facility diversity are partially associated with perceived neighborhood disorder, which is indirectly correlated with mental health through interactions with neighbors. This study is a preliminary attempt to disentangle the complex relationships among the neighborhood environment, social interaction and mental health in the context of developing megacities. The relevant findings provide an important reference for urban planners and administrators regarding how to build health-supportive neighborhoods and healthy cities.