Because of its advantages of low building height, good noise reduction performance, and high space utilization rate, the U-beam has been widely used in rail transit viaducts. However, research on its structural performance has been minimal. Based on the optimization module of Abaqus 6.14-1 and relying on a practical U-beam project, this paper adopts the method of topological optimization to study the optimal structural form of a 30-m standard-span simply supported elevated U-beam in rail transit under different supporting conditions. The minimum strain energy is taken as the objective function, and the volume limit is used as the constraint. The premise is to the necessary functional requirements such as train running space. After that, shape optimization is used to eliminate the stress concentration in the section. The results show that for deck bridges, the optimization results are similar to those of small box girders when the spacing between supports is small. For deck bridges, the optimization results are similar to those of T-beams when the spacing between supports is large. For deck bridges, the topology optimization form is close to the design scheme of U-beams of actual projects. After shape optimization, the local stress drops by 71.39% of the original value, and the stress concentration is obviously improved. The results also show that continuum structure topology optimization technology can be effectively applied to the schematic design of bridge structures.