Emerging evidence in North America and Europe suggests that traffic-related air pollution (TRAP) adversely affect cognition. However, little is known about this relationship in people living in low- and middle-income countries (LMICs). It is also unknown whether indoor air pollution can modify the effect of TRAP. The Chinese Longitudinal Healthy Longevity Survey (CLHLS) is a prospective cohort study of men and women aged 65 years and older enrolled in 2018. We ascertained residential proximity to major roadways based on self-reports and assessed cognitive function using the Chinese version of the Mini-Mental State Examination (MMSE). We used cooking fuel type and home ventilation as proxies for indoor air pollution. We examined the associations between traffic road proximity and cognitive impairment using multivariable logistic regressions, controlling for age, sex, marital status, education, residence, geographical regions, smoking, drinking, body mass index, socioeconomic status, dietary pattern, physical activity, depressive symptoms, indoor air pollution, and chronic conditions. We evaluated the effect modification in subgroup analyses and by assessing the interaction between indoor air pollution proxy and proximity to roadways.Among 11,104 individuals of average age 82.7 ±11.0 years old (54.0% female), we identified 3727 (33.6%) cases of cognitive impairment. The adjusted odds ratios (95% CI) of cognitive impairment were 1.20 (1.05, 1.37), 1.26 (1.09, 1.46), 1.02 (0.86, 1.21), and 1.07 (0.90, 1.28) for individuals living < 50 m, 50–100 m, 101–200m, and 200–300 m compared to those living > 300 m from a major roadway (P for trend <0.001). In dichotomized analyses comparing subjects living <100 m from a roadway to those living > 100 m, the risk (OR) associated with living closer to roadways was greater in participants who did not implement any ventilation during cooking (compared to those using natural or mechanical ventilation, 1.83 (1.32–2.53) vs. 1.14 (1.03–1.26), P for interaction = 0.006) and in solid fuel users (compared to clean fuel users, 1.37 (1.13–1.67) vs. 1.13 (1.04–1.21), P for interaction = 0.028). The associations were robust in a set of sensitivity analyses. We conclude that living closer to major roadways was associated with an increased risk for cognitive impairment in older adults in China, suggesting an adverse TRAP effect. Indoor air pollution appeared to enhance the TRAP effect synergistically.