The wear condition of steel rails directly affects the safety of railway operations. Line-structured-light visual measurement technology is used for online measurement of rail wear due to its ability to achieve high-precision dynamic measurements. However, in dynamic measurements, the random deviation of the measurement plane caused by the vibration of the railcar results in changes in the actual measured rail profile relative to its cross-sectional profile, ultimately leading to measurement deviations. To address these issues, this paper proposes a method for three-dimensional measurement of steel rail cross-sectional profiles based on binocular line-structured light. Firstly, calibrated dual cameras are used to simultaneously capture the profiles of both sides of the steel rail in the same world coordinate system, forming the complete rail profile. Then, considering that the wear at the rail waist is zero in actual operation, the coordinate of the circle center on both sides of the rail waist are connected to form feature vectors. The measured steel rail profile is aligned with the corresponding feature vectors of the standard steel rail model to achieve initial registration; next, the rail profile that has completed the preliminary matching is accurately matched with the target model based on the iterative closest point (ICP) algorithm. Finally, by comparing the projected complete rail profile onto the rail cross-sectional plane with the standard 3D rail model, the amount of wear on the railhead can be obtained. The experimental results indicate that the proposed line-structured-light measurement method for the complete rail profile, when compared to the measurements obtained from the rail wear gauge, exhibits smaller mean absolute deviation (MAD) and root mean square error (RMSE) for both the vertical and lateral dimensions. The MAD values for the vertical and lateral measurements are 0.009 mm and 0.039 mm, respectively, while the RMSE values are 0.011 mm and 0.048 mm. The MAD and RMSE values for the vertical and lateral wear measurements are lower than those obtained using the standard two-dimensional rail profile measurement method. Furthermore, it effectively eliminates the impact of vibrations during the dynamic measurement process, showcasing its practical engineering application value.