After the smart grid suffers from information attacks, how to accurately identify the attack type of the power system according to the change law of the measured data is an effective means to improve the security defense of the power grid. Aiming at the above problems, this paper proposes a smart grid network attack identification model based on extreme gradient boosting (XGBoost) algorithm. The power data oversampling method is designed based on Kmeans-smote to balance the measured data and solve the imbalanced problem of attack event samples. Then, based on the feature selection method of maximum correlation and minimum redundancy (MRMR), the optimal feature subset of information attack events is extracted to reduce the data dimension and improve the recognition efficiency of information attack. Finally, XGBoost classifier is designed to classify and recognize three kinds of attack states and normal states, and the identification performance of the model is evaluated by accuracy and recall rate. The experimental results prove that the network attack identification model improves the detection accuracy of smart grid information attacks significantly, which has good generalization.