At present, there are a series of problems in the optimization algorithm of train energy-saving control, such as the effect of optimization is not obvious and the convergence speed is slow. A PSO algorithm with adaptive inertia weight, learning factor with adjustable ability and improved speed update formula is proposed. Firstly, inertia weight is used to balance the search ability in different stages, and dynamic learning factor with adjustable ability is added to enhance the operation efficiency and convergence ability of the algorithm in the later stage, at the same time, penalty function is introduced to transform the constraints in train operation into penalty factor, which can improve the search rate. The second is to improve the traditional velocity update formula to reduce the probability of selecting unsatisfactory particles affecting the optimization results. After simulation and analysis by Matlab, compared with the traditional train operation optimization algorithm, the improved optimization algorithm converges faster and has better energy-saving effect.