This study attempts to draw on self-determination theory and the community psychology perspective to elaborate on the mechanisms underlying the association between community participation and life satisfaction in urban residential communities. The present study examines the mediating role of community identity in the relationship between community participation and life satisfaction. Moreover, the current study investigated the moderating effect of loneliness on the mediation model. A total of 1,205 urban residents, ranging in age from 18 to 65 years, completed the Community Participation Scale, the Community Identity Scale, the University of California, Los Angeles Loneliness Scale, and the Satisfaction with Life Scale for this study. The survey’s results suggest that community participation can be a positive predictor of community identity and life satisfaction. Moreover, the result of the mediation analysis demonstrates that the link between community participation and life satisfaction can be mediated by community identity. Furthermore, the moderated mediation model analysis indicates that loneliness moderated the link between community participation and community identity, as well as the link between community participation and life satisfaction. The mediating effect of community identity on the relationship between community participation and life satisfaction is stronger for residents with high levels of loneliness than for those with low levels of loneliness. These findings provide a comprehensive explanation for how community participation improves subjective well-being among urban residents in the context of a residential community.