Climate change and farmland environmental pollution have put greater pressure on the sustainability of agricultural production. Based on the provincial panel data of mainland China from 1978 to 2018, climate variables such as precipitation, temperature, and sunshine hours are included into the input indicators, and agricultural non-point source pollution and carbon emissions are taken as undesirable outputs, the agricultural production efficiency (APE) under the dual constraints of climate change and the resource environment was estimated by the super slacks-based measure (SBM)-undesirable model. On the basis of the trajectory of the imbalanced spatiotemporal evolution of APE shown by Kernel density estimation and the standard deviational ellipse (SDE)–center of gravity (COG) transfer model, the spatial convergence model was used to test the convergence and differentiation characteristics of APE. Under the dual constraints, APE presents a “bimodal” distribution with a stable increase in fluctuation, but it is still at a generally low level and does not show polarization, among which the APE in the northeast region is the highest. The COG of APE tends to transfer towards the northeast, and the coverage of the SDE is shrinking, so the overall spatial pattern is characterized by a tendency of clustering towards the north in the north-south direction and a tendency of imbalance in the east-west direction. APE has significant spatial convergence, and there is a trend of “latecomer catching-up” in low-efficiency regions. The introduction of spatial correlation accelerates the convergence rate and shortens the convergence period. The convergence rate is the highest in the central and western regions, followed by that in the northeastern region, and the convergence rate is the lowest in the eastern region. In addition, the convergence rate in different time periods has a phase change. The process of improving the quality and efficiency of agricultural production requires enhancing the adaptability of climate change, balancing the carrying capacity of the resource environment, and strengthening inter-regional cooperation and linkage in the field of agriculture.