Sustainable agriculture and rural development (SARD) plays a crucial role in maintaining natural resources, protecting the ecological environment, enhancing global food security, eradicating poverty, and even promoting rural revitalization. To understand the degree of implementation of SARD in the Shenfu coalfield under climate change, three villages that had different levels of energy development were selected. The linear trends and the Mann-Kendall method were used to analyse the climate change characteristics in the study area and a coordinated development model was employed to measure both the SARD coordination and its coordination degree and to analyse the perceptions of farmers, the adaption strategies they have employed, and the factors influencing the success of SARD. The results demonstrate that the climate in the study area has generally become warmer and drier, and this change has increased the vulnerability of the ecological environment and has had adverse impacts on local SARD. Farmers' perceptions of climate change are in line with climate records, but their perceptions of temperature change exhibit a certain time lag. In addition, their adaptation strategies are conducted autonomously, and they vary among the three villages. Based on these results, it is recommended that the local government implement additional policies relating to carbon capture and storage technologies to reduce the adverse effects of climate change. Factors influencing the success of SARD in the three villages are as follows: rapid urbanization; low incomes provided from crop farming; the outflow of primary and middle school students together with the accompanying population; climate warming and the increased frequency of extreme weather events; and environmental pollution and secondary geological disasters caused by coal mining. For all three villages, only by ensuring the synchronization of energy development and environmental protection can SARD be realized in the study area. Countermeasures that can be used to promote SARD in the Shenfu coalfield are proposed in this paper, and they include adjusting the industrial structure in the study area with respect to water conditions, selecting appropriate crop varieties, and accelerating the development of the alfalfa industry in response to national initiatives. • In the study area, the annual mean temperature increased while annual mean precipitation decreased, and this change has increased the vulnerability of the ecological environment while causing adverse impacts on local SARD. Farmers' perceptions about climate change are in basic agreement with climate records, although their perception of the temperature mutation slightly lags behind the one recorded. • Farmers' perceptions of climate change are in line with climate records, but their perceptions of temperature change exhibit a certain time lag. In addition, their adaptation strategies are conducted autonomously, and they vary among the three villages. Based on these results, it is recommended that the local government implement additional policies relating to carbon capture and storage technologies to reduce the adverse effects of climate change. • Factors influencing the success of SARD in the three villages are as follows: rapid urbanization; low incomes provided from crop farming; the outflow of primary and middle school students together with the accompanying population; climate warming and the increased frequency of extreme weather events; and environmental pollution and secondary geological disasters caused by coal mining. • For all three villages, only by ensuring the synchronization of energy development and environmental protection can SARD be realized in the study area. • Countermeasures that can be used to promote SARD in the Shenfu coalfield are proposed in this paper, and they include adjusting the industrial structure in the study area with respect to water conditions, selecting appropriate crop varieties, and accelerating the development of the alfalfa industry in response to national initiatives. [ABSTRACT FROM AUTHOR]