Modernizing agricultural economies requires the infusion of knowledge and industrialization, necessitating the bridging of the “digital divide” and “talent gap” between urban and rural areas. Public libraries, as key knowledge dissemination institutions, play a crucial role in this process. This study aimed to explore how the development of such institutions can align with agricultural economic growth. Using China as a case study, where the Rural Revitalization Strategy has been implemented in recent years, including the extensive construction of rural public libraries and other infrastructure, we empirically analyzed the correlation between county-level public libraries and agricultural economic development from 2012 to 2019. The results show that the number of county-level public libraries and their assets, collection sizes, e-books, and professional staff have a significant positive impact on agricultural economics, while non-professional staff and facilities have a negative impact. It is recommended that future rural public library development should focus on enhancing professional standards and advancing digitalization and mobile internet integration, while being cautious about expanding the physical scale and staffing. This study fills a gap in the research on the correlation between rural public libraries and agricultural economics, and the methodology employed has a certain degree of general applicability. However, the applicability of the conclusions may be limited by China’s unique national conditions.