With the global concern for carbon dioxide, the carbon emission trading market is becoming more and more important. An accurate forecast of carbon price plays a significant role in understanding the dynamics of the carbon trading market and achieving national emission reduction targets. Carbon prices are influenced by many factors, which makes carbon price forecasting a complicated problem. In recent years, deep learning models are widely used in price forecasting, because they have high forecasting accuracy when dealing with nonlinear time series data. In this paper, Multivariate Long Short-Term Memory (LSTM) in deep learning is used to forecast carbon prices in China, which takes into account the factors affecting the carbon price. The historical time series data of carbon prices in Hubei (HBEA) and Guangdong (GDEA) and three traditional energy prices affecting carbon prices from 5 May 2014 to 22 July 2021 are collected to form two data sets. To prove the forecast effect of our model, this paper not only uses Multivariate LSTM, Multilayer Perceptron (MLP), Support Vector Regression (SVR), and Recurrent Neural Network (RNN) to forecast the same data, but also compares the forecast results of Multivariate LSTM with the existing research on HBEA and GDEA forecast based on deep learning recently. The results show that the MAE, MSE, and RMSE obtained by the Multivariate LSTM are all smaller than other prediction models, which proves that the model is more suitable for carbon price forecast and offers a new approach to carbon prices forecast. This research conclusion also provides some policy implications.