Depressive symptoms are common during adolescence. Failure at school often relates to low self-efficacy that, in turn, is associated with depressive symptoms. Several studies have supported the role of friends in counteracting depression in adolescence. The present study tested a mediation model in which the indirect effect between school achievement and depressive symptoms, mediated by perceived self-efficacy, was moderated by peer relationships at school. Self-report questionnaires were administered to 1004 adolescents aged 14 to 18 years (M = 15.5; SD = 1.2). The moderated mediation model showed that the mediation of self-efficacy in the relation between school achievement and depressive symptoms was moderated by peer relationships. Higher self-efficacy was associated to lower depressive symptoms, in particular in adolescents with more school friends. Conversely, the magnitude of this association is weaker for those with fewer school friends. Programs aimed at reducing psychological malaise should focus on fostering positive relationships among classmates.