To describe the spatiotemporal variations characteristics and future trends of urban air quality in China, this study evaluates the spatiotemporal evolution features and linkages between the air quality index (AQI) and six primary pollution indicators, using air quality monitoring data from 2014 to 2022. Seasonal autoregressive integrated moving average (SARIMA) and random forest (RF) models are created to forecast air quality. (1) The study’s findings indicate that pollution levels and air quality index values in Chinese cities decline annually, following a “U”-shaped pattern with a monthly variation. The pollutant levels are high in winter and low in spring, and low in summer and rising in the fall (O3shows the opposite). (2) The spatial distribution of air quality in Chinese cities is low in the southeast and high in the northwest, and low in the coastal areas and higher in the inland areas. The correlation coefficients between AQI and the pollutant concentrations are as follows: fine particulate matter (PM2.5), inhalable particulate matter (PM10), carbon monoxide (CO), nitrogen dioxide (NO2), sulfur dioxide (SO2), and ozone (O3) values are correlated at 0.89, 0.84, 0.54, 0.54, 0.32, and 0.056, respectively. (3) In terms of short-term AQI predictions, the RF model performs better than the SARIMA model. The long-term forecast indicates that the average AQI value in Chinese cities is expected to decrease by 0.32 points in 2032 compared to the 2022 level of 52.95. This study has some guiding significance for the analysis and prediction of urban air quality.