With the rapid development of electric vehicles, the infrastructure for charging stations is also expanding quickly, and the failure rate of charging piles is increasing. To address the effective operation and maintenance of charging stations, a method based on the XGBoost algorithm for electric vehicle DC charging stations is proposed. An operation and maintenance system is con-structed based on state analysis, considering the operation status of the charging station and users' charging habits. Factors such as driving and charging habits, road traffic, and charging station equipment are taken into account. The training sample data is established using historical data, online monitoring data, and external environmental data, and the charging station status evaluation model is trained using the XGBoost algorithm. Based on the condition assessment results, a risk assessment model is established in combination with fault parameters. Risk tracking of the charging station is conducted using the lack of power supply (ENC), evaluating the risk level of each station, and determining the operation and maintenance order. The optimal opera-tion and maintenance model for DC charging stations, aimed at achieving both economic and reliable goals, is constructed to determine the operation and maintenance schedule for each sta-tion. The results of the case study demonstrate that the state evaluation and operation and maintenance strategy can significantly improve the reliability of the system and the overall ben-efits of operation and maintenance while meeting the required standards.