Loneliness is a prevalent issue among rural left-behind children in China, adversely affecting their physical and mental well-being, as well as social stability. However, the influencing factors and potential mechanisms of loneliness have not yet been fully clarified. This study aims to validate the mediating roles of social anxiety and psychological resilience by examining the association between affective/cognitive empathy and loneliness among Chinese rural left-behind children. This cross-sectional survey employed a convenience sampling approach among Chinese left-behind children. A total of 540 participants aged 6 to 11 years old (Average age = 8.54, SD = 1.682) from 3 primary schools in Hunan Province completed the Children's Loneliness Scale, Social Anxiety Scale for Children, The Chinese version of Connor-Davidson Resilience Scale, and Basic Empathy Scale. Data analysis was conducted using SPSS 27.0, Origin 2020, and Mplus 8.3. Pearson correlation analyses suggested strong significant correlations among affective/cognitive empathy, loneliness, social anxiety, and psychological resilience. Path analyses indicated that the chain mediation effect size of social anxiety and psychological resilience was 0.016 between affective empathy and loneliness, while the chain mediation effect size between cognitive empathy and loneliness was -0.011. Affective empathy positively correlates with loneliness among Chinese left-behind children through social anxiety and resilience, while cognitive empathy negatively correlates with loneliness. These findings suggest that left-behind children should enhance their cognitive empathy and psychological resilience to reduce their social anxiety, thereby mitigating their loneliness.