This study contributes to the state of the art by addressing the scarcity of empirical research on homesickness within the unique context of Islamic boarding schools (pesantren), which differ substantially from Western residential education settings commonly examined in the literature. While previous studies have explored homesickness, social adaptation, and academic stress in general boarding or international student populations, this research advances the field by integrating these constructs with family attachment and prior separation experiences as moderators. Data were obtained from pesantren students in Yogyakarta region utilizing a cross-sectional survey approach and analyzed through Structural Equation Modeling with Partial Least Squares (SEM-PLS). The research utilized five validated tools to assess social adaptation, academic stress, homesickness, prior separation experiences, and familial attachment. The model accounted for 65.8% of the variance in homesickness levels. Social adaptation markedly diminished homesickness (β = -0.241, p < 0.001), whereas academic stress exacerbated it (β = 0.326, p < 0.001). Family attachment was identified as the most significant predictor of homesickness (β = 0.487, p < 0.001), suggesting that stronger familial connections paradoxically heighten feelings of homesickness. Previous separation experience acted as a protective factor (β = -0.198, p < 0.001) and attenuated the association between academic stress and homesickness. The findings indicate that homesickness in pesantren is a complex issue necessitating specialized intervention programs that take into account adolescents' attachment styles and prior separation experiences to improve psychological well-being and adaptive outcomes.