To enhance the energy efficiency and operational performance of metro railway systems, rectifier units (RUs), and energy feedback systems (EFSs) are increasingly being adopted in urban rail transit systems. In this article, a novel bi-level methodology focusing on the joint optimization of RU and EFS is proposed for the design of dc metro lines, with the objective of minimizing the total annual project cost. The methodology aims to determine the optimal combination of traction substation (TS) and EFS configurations, including their locations and sizes. The proposed strategy determines suitable TS solutions at the upper level, considering constraints related to rail potential and power supply capacity under " $N-1$ " conditions. Subsequently, optimal solutions for EFS configurations are obtained at the lower level, considering annual electricity consumption costs and the cost of EFS. To solve this problem, a bi-level algorithm that utilizes a modified salp swarm algorithm (MSSA) in combination with a traction power flow simulator is designed. The optimization methodology is evaluated through simulations conducted on the Xuzhou metro line 2 in China. The simulation results demonstrate that the proposed optimization method can effectively obtain optimal solutions, resulting in a significant reduction of the project's annual cost by 3.78%.