As China is on its way to achieving its carbon peaking and carbon neutrality goals, forecasting energy demand is increasingly important. Aiming at the problem of energy demand forecasting, this paper uses the logistic equation and Markov Model to improve the traditional Grey Forecast Model. And based on the data of China's total energy consumption from 2002 to 2021 as the original data, an improved grey prediction model was established. The validity of the prediction model in this paper is verified by the comparative analysis with the prediction results of the STIRPAT and LSTM prediction models. The results show that compared with the STIRPAT and LSTM prediction models, the predicted results of the improved Grey Forecast Model have smaller relative errors, more accurate prediction results, and better prediction performance.