In this paper, an improved multi-objective shark smell optimization algorithm using composite angle cosine is proposed for automatic train operation (ATO). Specifically, when solving the problem that the automatic train operation velocity trajectory optimization easily falls into local optimum, the shark smell optimization algorithm with strong searching ability is adopted, and composite angle cosine is incorporated. In addition, the dual-population evolution mechanism is adopted to restrain the aggregation phenomenon in shark population at the end of the iteration to suppress the local convergence. Correspondingly, the composite angle cosine, considering the numerical difference and preference difference, is used as the evaluation index, which ameliorates the shortcoming that the traditional evaluation index is not objective and reasonable. Finally, the Matlab/simulation and hardware-in-the-loop simulation (HILS) results for automatic train operation show that the improved optimization algorithm proposed in this paper has better optimization performance.