The purpose of this study was to examine the association between age-friendliness of a city, loneliness and depression moderated by internet use among older people during the coronavirus disease 2019 (COVID-19) pandemic. The survey was from 'The 2020 Survey of Needs Assessment for a Safe Community and Age-Friendly City' in Xinyi District, Taipei, which was conducted by face-to-face interviews with community-based older adults who were aged 65 and above from one district of Taipei City from May to June 2020 (n = 335). Partial least square structural equation modeling and the SPSS PROCESS macro were used for data analysis. Two domains of an age-friendly city (housing and community support and health services) were found to be associated with reduced loneliness, while one (respect and social inclusion) was associated with decreased depression. The age-friendliness of cities mitigates depression through moderator (internet use) and mediation (loneliness) mechanisms. Although some age-friendly domains of the city reduced loneliness and depression directly, the age-friendliness-loneliness-depression mechanism held true only for older adults who used the internet and not for nonusers. Maintaining the age-friendliness of an environment is beneficial to mental health, and internet use is a necessary condition to gain optimum benefits from age-friendly initiatives. Policy suggestions are discussed.