This paper focuses on the issue of global warming. Due to a large amount of alarming temperature reporting data in the past, with some countries hitting new temperature highs again and many countries declaring emergencies, this has raised concerns about future temperatures. Therefore, this paper predicts the future temperature changes based on historical data, and observes the future temperature trends in 2050 and 2100 as an example, focusing on comparing which one is more accurate in global temperature prediction, the ARIMA model or the BP neural network model. The data was first processed and then an ARIMA model was built using MATLAB and a BP neural network model was built using SPSS. These two models were used to describe the past and predict the future global temperature levels, and line graphs were plotted using SPSS. The two models predict that the temperature in 2050 will be 10.16 °C and 11 °C respectively, the temperature in 2100 will be 10.87 °C and 13 °C differently, and the time for the temperature to reach 20 °C will be 2202 and 2350 separately. Finally, the model was tested by regression analysis of the two models, and the goodness of fit of Arima model and BP neural network was calculated to be 0.726 and 0.84668 respectively, BP neural model is better.