The use of U-shaped girders has become increasingly popular in advanced projects such as metro rail systems due to their ability to provide greater vertical clearance beneath bridges. These girders, characterized by two webs and a bottom flange, contribute essential longitudinal stiffness and strength to the overall structure while effectively countering torsional forces in curved bridges. However, the design and construction of U-shaped girders present challenges, including their relatively higher self-weight compared to other girder types. Consequently, cost optimization has become a crucial focus in structural design studies. This research aims to develop an optimization model for prestressed U-shaped girders using the AASHTO LRFD bridge design specifications. The model is based on the Box complex method, with necessary modifications and improvements to achieve an optimal design. The objective is to minimize the total cost of materials, including concrete, steel reinforcement, and prestressing strands, while satisfying explicit and implicit design constraints. To facilitate the analysis, design, and optimization processes, a program is developed using Visual Studio 2010 and implemented in Visual Basic (VB.NET). The program incorporates separate subroutines for analysis, design, and optimization of the prestressed U-shaped girder, which are integrated to produce the desired results. When running the program, the optimization process required 229 iterations to converge to the optimal cost function value. The results demonstrate that the developed algorithm efficiently explores economically and structurally effective solutions, resulting in cost savings compared to the initial design. The convergence rate of the moment capacity constraint is identified as a key factor in achieving the optimal design. This research makes a significant contribution to the field of civil engineering by applying the classical Box complex method to the optimization of girders, an area where its utilization has been limited. Furthermore, this study specifically addresses the optimization of prestressed U-shaped girders in metro rail projects, where they serve as both the deck and support structure for train loading. By employing the Box complex method, this research aims to fill the research gap and provide valuable insights into the optimization of U-shaped girders. This approach offers a fresh perspective on designing these girders, considering their unique role in supporting metro rail loads. By leveraging the benefits of the Box complex method, researchers can explore new possibilities and uncover optimal design solutions for U-shaped girders in metro rail applications.