Surface ozone concentrations increased in many regions of China from 2015 to 2019. While the central role of meteorology in modulating ozone pollution is widely acknowledged, its quantitative contribution remains highly uncertain. Here, we use a data-driven machine learning approach to assess the impacts of meteorology on surface ozone variations in China for the period 2015–2019, considering the months of highest ozone pollution from April to October. To quantify the importance of various meteorological driver variables, we apply nonlinear random forest regression (RFR) and linear ridge regression (RR) to learn about the relationship between meteorological variability and surface ozone in China, and contrast the results to those obtained with the widely used multiple linear regression (MLR) and stepwise MLR. We show that RFR outperforms the three linear methods when predicting ozone using local meteorological predictor variables, as evident from its higher coefficients of determination (R2) with observations (0.5–0.6 across China) when compared to the linear methods (typically R2 = 0.4–0.5). This refers to the importance of nonlinear relationships between local meteorological factors and ozone, which are not captured by linear regression algorithms. In addition, we find that including nonlocal meteorological predictors can further improve the modelling skill of RR, particularly for southern China where the averaged R2 increases from 0.47 to 0.6. Moreover, this improved RR shows a higher averaged meteorological contribution to the increased trend of ozone pollution in that region, pointing towards an elevated importance of large-scale meteorological phenomena for ozone pollution in southern China. Overall, RFR and RR are in close agreement concerning the leading meteorological drivers behind regional ozone pollution. In line with expectations, our analysis underlines that hot and dry weather conditions with high sunlight intensity are strongly related to high ozone pollution across China, thus further validating our novel approach. In contrast to previous studies, we also highlight surface solar radiation as a key meteorological variable to be considered in future analyses. By comparing our meteorology based predictions with observed ozone values between 2015 and 2019, we estimate that almost half of the 2015–2019 ozone trends across China might have been caused by meteorological variability. These insights are of particular importance given possible increases in the frequency and intensity of weather extremes such as heatwaves under climate change.