This article tackles the issue of trajectory tracking in the automatic train operation system of high-speed trains. Taking into account parameter uncertainty, unknown disturbances, and the longitudinal impulse of the coupler, a multibody dynamics model has been developed to enable the distributed control mode, where each vehicle of a train is equipped with its own controller. Then, a novel boundary constraint adaptive terminal sliding mode control (BATSMC) method is proposed to achieve speed and position tracking control, where the Barrier Lyapunov Function (BLF) is utilized to achieve active boundary constraint on the train's speed. Further, it has been mathematically proven that the control errors of vehicles converge uniformly and the vehicle's speed remains bounded. Finally, numerical simulation are presented using data from CRH380B train, and the results demonstrate the effectiveness of the proposed BATSMC method for trajectory tracking and cooperative control.