The purpose of this study is to explore the mediating mechanism of peer attachment in regulating internet addiction among rural adolescents. The method used the Likert five point self-report scale for field sampling, SPSS 25.0 software for data analysis, two tailed Pearson correlation analysis, and regression analysis. As a result, peer attachment has a direct impact of 0.36 on internet addiction and 0.48 on loneliness. Loneliness has a direct impact of 0.52 on internet addiction, with a mediating effect of loneliness is 0.249(0.48*0.52) ,it is a partial mediator. The impact of the interaction between high and low shyness and high and low peer attachment on loneliness is 0.44 and 0.12, respectively. In the moderated mediating effect, the indirect moderating effect of high shyness was 0.26, low shyness was 0.11, and the difference between the two groups was 0.15.Conclusion:Peer attachment has a positive impact on internet addiction among rural adolescents. Loneliness plays a mediating role in peer attachment and internet addiction. Shyness plays a differential regulatory role in the relationship between peer attachment and individual loneliness, and the indirect impact of peer attachment on internet addiction will be enhanced or weakened by the strength of the mediating effect of shyness’s differential regulation of loneliness.