Objectives Abundant evidence has demonstrated that positive interpersonal relationships promote children's learning engagement. However, most existing studies only focus on the role of one or two attachment relationships, and few studies examine the relationship between multiple positive interpersonal relationships from family and school environments and children's learning engagement. The purpose of this study is to simultaneously examine the effects of father-child and mother-child attachment from the family environment and teacher-student relationship and peer attachment from the school environment on learning engagement of Chinese boys and girls. Methods Participants (N = 702; 51.6% male, M-age = 10.39, SDage = 0.49) were recruited from seven primary schools in Guizhou province, China. Participants completed five self-report questionnaires assessing children's learning engagement, father-child attachment, mother-child attachment, teacher-student relationship and peer attachment. Results The results displayed that only mother-child attachment and teacher-student relationship significantly predicted boys' learning engagement. In addition, we also found that only teacher-student relationship and peer attachment positively predicted girls' learning engagement. Conclusions Our findings highlight that teacher-student relationship promotes learning engagement in both boys and girls, and in addition, mother-child attachment from the family environment enhances boys' learning engagement and peer attachment from the school environment promotes girls' learning engagement. This study's results suggest that future attachment-based interventions aimed at contributing to children's academic development should focus on teacher-student relationships for both boys and girls, on mother-child relationships for boys, and on peer relationships for girls.