Achieving an optimal operating cost is a challenge for the development of hybrid tramways. In the past few years, in addition to fuel costs, the lifespan of the power source is being increasingly considered as an important factor that influences the operating cost of a tramway. In this work, an optimal energy management strategy based on a multi-mode strategy and optimisation algorithm is described for a high-power fuel cell hybrid tramway. The objective of optimisation is to decrease the operating costs under the conditions of guaranteeing tramway performance. Besides the fuel costs, the replacement cost and initial investment of all power units are also considered in the cost model, which is expressed in economic terms. Using two optimisation algorithms, a multi-population genetic algorithm and an artificial fish swarm algorithm, the hybrid system's power targets for the energy management strategy were acquired using the multi-objective optimisation. The selected case study includes a low-floor light rail vehicle, and experimental validations were performed using a hardware-in-the-loop workbench. The results testify that an optimised energy management strategy can fulfil the operational requirements, reduce the daily operation costs and improve the efficiency of the fuel cell system for a hybrid tramway.