Pest management is pivotal for ensuring secure grain production and constitutes a fundamental strategy in combating pests that detrimentally affect grain supplies. Given the complexity and dynamic nature of pests, it is imperative that farmers implement coordinated prevention and control strategies. Such measures are essential to augment the efficacy of these efforts and to reduce the risks posed by pests to agricultural crops. This research involved a survey of 1205 agricultural households spanning three representative provinces in Northwestern China. By employing an endogenous switching Probit model and addressing sample selection bias, the study investigates the influence of social learning on the adoption of cooperative pest control strategies by farmers. The findings indicate that social learning significantly enhances farmers’ adoption of cooperative pest control measures. In a counterfactual scenario, introducing social learning to farmers previously unexposed to it would result in a 10.3% increase in the likelihood of adopting these practices. Additionally, factors such as the health status of the household head, income level, and size of land under management are critical determinants of farmers’ participation in social learning. The differential access to scientific, accurate, and systematic information, coupled with resource disparities among farmers, can partially account for the varying average treatment effects observed in different learning methods on the propensity to adopt cooperative pest control practices. Furthermore, social learning plays a crucial role in fostering such adoption by establishing trust among farmers, facilitating consensus in decision-making, and enhancing the dissemination of information.