Background: The increasing prevalence of obesity across all age groups has become a major health concern in China. Previous studies have found strong links between population density, sedentary lifestyle, and the risk of being overweight among adults and adolescents in Western countries. However, little research has been conducted to disentangle this relationship in China, which is rapidly urbanizing and densely populated. Compared to other age groups, middle-aged and older adults tend to have a higher risk of being overweight, which increases their risk of diabetes, high blood pressure, and other weight-related chronic diseases. In addition, they are especially sensitive to neighbourhood environmental factors such as population density. Therefore, we aimed to unravel the link between population density and the risk of being overweight among Chinese middle-aged and older adults, with a particular focus on the mediating role of lifestyle choices. Methods: Data from the 2011 China Health and Retirement Longitudinal Study were analysed. Individuals (N = 5285) were sampled from 405 neighbourhoods nested within 150 cities. Body Mass Index (BMI) was calculated based on self-reported body weight and height (being overweight was defined as a BMI ≥ 24 kg/m 2). Multilevel regression and mediation analyses were applied to explore associations between population density, a sedentary lifestyle, and the risk of being overweight. Results: Middle-aged and older adults who lived in densely populated neighbourhoods had higher odds of being overweight. Further, this link was mediated by residents' mode of travel and physical exercise; specifically, these residents had higher odds of owning a car and spending lesser time on weekly physical exercise, thereby increasing their risk of being overweight. Furthermore, the association between car ownership and the odds of being overweight varied by neighbourhood population density. Conclusions: There was a positive association between neighbourhood population density and middle-aged and older adults' risk of being overweight. This relationship may exist because people who live in densely populated neighbourhoods tend to lead a sedentary lifestyle. Our findings also suggest that, in rapidly urbanizing countries, a sedentary lifestyle may be especially harmful to middle-aged and older adults who live in densely populated neighbourhoods.