IntroductionSubjective well‐being, an important index for measuring mental health, is presently declining among junior high school students. Envy, one of their common emotions, is inextricably linked to subjective well‐being. Based on the Dual Envy Theory, our research explores the bidirectional relationship between benign‐malicious envy and subjective well‐being. The mediating role of self‐esteem, as well as the related gender differences, is examined.MethodsChinese middle school students (n = 1566, boys 50.3%, age = 13.96 ± 0.88 years old) were assessed at two time points over a 3‐month interval. Structural equation modeling was used to examine the longitudinal relationships among the variables.Results(1) Cross‐lagged analysis showed a positive bidirectional relationship between benign envy and subjective well‐being and a negative bidirectional relationship between malicious envy and subjective well‐being in the total sample. However, the path from T1 subjective well‐being to T2 malicious envy in boys was not significant. (2) Self‐esteem mediated the relationship between both benign and malicious envy and subjective well‐being among both boys and girls. A Wald chi‐square test showed that T2 self‐esteem was a stronger predictor of T2 benign envy in boys than in girls.ConclusionThe results reveal a virtuous cycle of benign envy and subjective well‐being, and a vicious cycle of malicious envy and subjective well‐being, while emphasizing the role of self‐esteem in this process. Gender differences were also noted. These findings have important implications for improving the subjective well‐being of secondary school students and exploring the positive effects of envy.