This study aims to explore the relationships between national identity, self-esteem, and subjective well-being among adolescents, with a particular focus on the mediating role of self-esteem between national identity and subjective well-being. A questionnaire survey conducted among 1,948 Chinese adolescents revealed significant positive correlations between national identity, self-esteem, and subjective well-being (p < 0.01). Gender, status, and place of birth significantly influenced national identity, self-esteem, and subjective well-being (p < 0.05). Structural equation modeling analysis revealed that national identity has a positive and direct effect on self-esteem (estimate: 0.48, SE = 0.03, p < 0.001); self-esteem has a positive and direct effect on subjective well-being (estimate: 0.59, SE = 0.03, p < 0.001); and national identity has a positive and direct effect on subjective well-being (estimate: 0.25, SE = 0.05, p < 0.001). Additionally, self-esteem plays a crucial mediating role between national identity and subjective well-being (p < 0.001). These findings underscore the importance of national identity in adolescents’ mental health and well-being and highlight the key role of self-esteem in moderating this relationship.