This study investigates the correlation between farmers’ knowledge and behavior concerning environmentally friendly pest control in Bantul, Indonesia, a significant rice production area challenged by pest and disease. The objective was to assess the farmers’ understanding and behavior in applying Integrated Pest Control (IPC) techniques, determine the contributing factors to their knowledge level, and ascertain the relationship between knowledge and behavior. Employing a quantitative descriptive approach, the research encompassed 120 purposively selected farmers across four districts. Linear regression and Spearman correlation were used for data analysis. The findings indicate that both the knowledge and behavior of farmers regarding IPC were moderately rated. Factors such as farmers’ group activities, workshop participation, individual perceptions, and land size were found to influence the farmers’ knowledge level. Furthermore, a correlation was discerned between farmers’ knowledge and behavior in implementing eco-friendly pest control. The study underscores the necessity of targeted interventions to enhance farmer education and advocacy, as these can influence pest control behavior, ultimately promoting sustainable farming practices.