Urban rail transit can solve the current inconvenient transportation problem for China's large urban population. A compound onboard energy storage system can meet vehicles' traction requirements and recover energy in vehicles' braking stage to improve energy utilisation. However, the composite onboard energy storage system has several concerns, such as its power and energy demand, battery aging, and maintenance costs. Therefore, the NSGA-II algorithm is proposed to optimise matching the composite energy storage system parameters for urban rail trains. The NSGA-II algorithm was used with an improved elite retention strategy to optimise the parameters matching of the composite power supply. The optimisation's objective concerns the replacement costs and economy of the composite power supply. The method increases the vertical diversity of searching and avoids genetic precocity. The NSGA-II algorithm calls the simulation model of composite power supply in real-time and simultaneously optimises the composite power supply and control parameters. The Pareto set of optimisation objectives and corresponding parameters and control strategies of composite power supply are obtained. The NSGA-II algorithm can optimise the composite energy storage system's parameters and improve the train and the composite power supply's performance indexes. The algorithm greatly reduces the composite power supply's capacitance and reduces the system's total energy consumption. Then, the multi-component energy loss caused by the multi-power source system can be effectively controlled. The total capacitance is reduced by 12.1%, the battery life is prolonged by 18.86%, and the optimised composite power supply's energy storage is increased by 17.6%.