To reduce the impact of a mountain ridge on the crosswind flow field of a specific section of the Lanzhou-Xinjiang high-speed railway, a portion of the mountain ridge was removed to increase the distance from the windbreak. To verify the effects of this flow optimization measure, the wind speed and wind angle were tested in this mountain ridge region. In this paper, under the actual conditions of this specific case study, the average and transient wind characteristics were analyzed based on the test results. Then, based on the actual terrain model, using the computational fluid dynamics (CFD) method with two inlet boundary conditions, namely, constant wind and exponential wind, the results obtained from the two boundary conditions were validated. Furthermore, the visualized flow structures and wind speed distributions along the railway under both boundary conditions were compared. Finally, along the railway, the impacts of different terrain types on the flow field of the railway were compared.