Prior studies on the association between traffic noise and mental health have been mostly conducted in settings with lower population densities. However, evidence is lacking in high population-density settings where traffic noise is more pervasive and varies by topography and the vertical elevation of the residential unit. This study aimed to assess the mental health impact of residential traffic noise in one of the world's most urbanised populations. Data were analysed from 13,401 participants aged ≥15 years in a prospective cohort in Hong Kong from 2009 to 2014. Residential traffic noise level was estimated using 3D-geocoding and validated models that accounted for sound propagation in a highly vertical landscape. The 24-h day-night exposure to traffic noise, denoted as Ldn, was estimated with a 10-dB(A) penalty for night hours. Probable depression and mental wellbeing were assessed using the Patient Health Questionnaire-9 and the Short Form Health Questionnaire SF-12v2, respectively. Mixed effect regressions with random intercepts were used to examine the association between traffic noise and mental health outcomes. Residential road traffic noise (for each increment of 10 A-weighted decibels [dB(A)] 24-h average exposure) was associated with probable depression (odds ratio (OR) = 1.17, 95% CI: 1.05, 1.31), and poorer mental wellbeing (mean difference = −0.19, 95% CI: 0.31, −0.06), adjusting for sociodemographics, smoking, body mass index, self-reported health, proximity to green space, and neighbourhood characteristics (average household income, population density, and Gini coefficient). The results were robust to further adjustment for air pollution. In stratified analyses, residential traffic noise was associated with probable depression and poorer mental wellbeing among students and individuals aged 15–34 years. Residential traffic noise was associated with probable depression and poorer mental wellbeing in a highly urbanised setting. As traffic noise is increasing in urban settings, the public health impact of noise pollution could be substantial.