Crop pests and diseases (CPDs) are emerging threats to global food security, but trends in the occurrence of pests and diseases remain largely unknown due to the lack of observations for major crop producers. Here, on the basis of a unique historical dataset with more than 5,500 statistical records, we found an increased occurrence of CPDs in every province of China, with the national average rate of CPD occurrence increasing by a factor of four (from 53% to 218%) during 1970-2016. Historical climate change is responsible for more than one-fifth of the observed increment of CPD occurrence (22% ± 17%), ranging from 2% to 79% in different provinces. Among the climatic factors considered, warmer nighttime temperatures contribute most to the increasing occurrence of CPDs (11% ± 9%). Projections of future CPDs show that at the end of this century, climate change will lead to an increase in CPD occurrence by 243% ± 110% under a low-emissions scenario (SSP126) and 460% ± 213% under a high-emissions scenario (SSP585), with the magnitude largely dependent on the impacts of warmer nighttime temperatures and decreasing frost days. This observation-based evidence highlights the urgent need to accurately account for the increasing risk of CPDs in mitigating the impacts of climate change on food production.