ObjectiveThis study investigates peer effects on the health behaviors of middle-aged and older adult people in China and examines the moderating role of Internet use.MethodsA total of 16,188 respondents were selected from the China Health and Retirement Longitudinal Study (CHARLS) 2020 data set. Ordinary Least Squares and Quantile Regression were used to validate the peer effect of health behaviors on middle-aged and older adults, and a moderating effects model was used to test the moderating roles of Internet use and Internet proficiency. Finally, the peer effect was analyzed for heterogeneity according to Internet use preferences.ResultsThe peer effect had a positive influence on the individual health behaviors of middle-aged and older adult people in China (β = 0.5341, p < 0.001). Middle-aged and older adult people were more sensitive to the average health behavior level of the community when they lived in rural communities and/or had a low level of education. Internet use positively moderated the health behavior peer effect in the older adult population (β = 0.0094, p < 0.1), and Internet proficiency negatively moderated the peer effect of the health behaviors of the middle-aged population (β = 0.1589, p < 0.1). According to the magnitude of the influence of peer effect, the Internet preference type can be ranked from social and entertainment (β = 0.6250, p < 0.01), to cultural and entertainment (β = 0.5835, p < 0.01), to comprehensive (β = 0.4622, p < 0.01).ConclusionThere is a peer effect on the health behaviors of middle-aged and old-aged individuals, in which Internet use plays a moderating role. The construction of healthy communities should be promoted, giving full play to the community’s active role in health promotion. Attention should be paid to the health-enabling function of the Internet, encouraging middle-aged and older adult people to use the Internet actively, moderately, and diversely, and making full use of the advantages of short videos for online health education.