This study explored how Korean students' happiness impacts depression during their transition from middle to high school, emphasizing teacher relationships as a mediator and peer and parental relationships as moderators. Utilizing data from 2147 students (1150 male, 997 female) in the Korean Children and Youth Panel Survey, this study assessed happiness, depression, and relationships with teachers, peers, and parents in 2020 and 2021. Data analyses involved Pearson's correlations, descriptive statistics, and the SPSS 28.0 macro-PROCESS model for mediation and moderated mediation. Happiness in third-grade middle school students (<i>M</i> = 3.0509, <i>SD</i> = 0.4583) was positively linked to high school teacher relationships (β = 0.1958, <i>p</i> < 0.001) and negatively linked to depression (β = -0.1732, <i>p</i> < 0.001). Teacher relationships mediated the link between happiness and depression, with an indirect effect of β = -0.0339 (<i>p</i> < 0.001). Reduced negative parental attitudes strengthened the link between happiness and teacher relationships (β = -0.1045, <i>p</i> < 0.01). Teacher-student relationships are vital for adolescent emotional health, particularly during academic stress. Policies should encourage such relationships, enhance parenting, and develop students' social skills.