Reasonable carbon market price prediction can facilitate the carbon market participants, such as physical producers, to achieve the goal of efficient emission reduction through the market mechanism. In this paper, we use XGBoost, an integrated algorithm in machine learning, to forecast the domestic carbon price from 2013 to 2021. Pearson coefficient is utilized to calculate the correlation of data features, and perform PCA dimensionality reduction on the features with high correlation coefficients. Before using PCA to reduce the dimensions, in order to make the feature data more suitable for later model training, the feature data is standardized. After the standardization, PCA selects super parameters with maximum likelihood estimation and outputs the dimension reduction results of features. Finally, the integrated algorithm XGBoost is used to form a prediction model for the carbon price. RMSE output from cross validation are used to evaluate the accuracy and error of the prediction results. The results show that this paper confirms that the integrated algorithm XGBoost model has a good prediction ability for carbon price, and provides a novel idea for the field of carbon emission price prediction. It is expected to provide some rational basis for the carbon market participants to make investment decisions, so as to avoid the carbon market risk caused by the change of carbon price.