This paper aims to present a cooperative control method to improve the tracking accuracy and safety of multiple trains under uncertain system environment. In the controller design, prescribed performance functions are devised to restrict global tracking errors and guarantee the transient and steady-state performance of each train. An active security protection control framework is designed based on the technique of integrating terminal sliding mode, enabling the trains to reach state consensus quickly in finite time and guaranteeing the inter-train distances always to be within the safe range. The radial basis function neural network is adopted to approximate the time-varying running resistance of the trains. Consequently, the cooperative control method is established under which the multiple-train system achieves state consensus with specified performance and collisions avoidance guarantees during the train status adjustment process. Finally, rigorous mathematical analysis is provided and experimental simulations are conducted to jointly demonstrate the effectiveness and feasibility of the proposed theoretical results.