The existing bridge deformation detection methods based on fiber optic gyro (fog) cannot eliminate the path deviation caused by the yaw of the detection trolley, and the deformation detection method of Rail Steel Bridge based on fiber optic gyroscope (fog) is proposed. Firstly, the principle and system architecture of fiber-optic gyroscope measurement of bridge alignment are explained; Then the steel structure under rail condition is analyzed by finite element method. By setting different temperature gradients, it is verified that the deformation of the track is linear with the temperature, and the error model of the track is established. Finally, the validity of the method is verified by setting up the test environment to test the track alignment and the track deformation at different temperatures. The experimental results show that the relationship between the deformation of Rail Steel Bridge and the ambient temperature is 1~ 2mm/10℃, which provides a temperature error calibration model for subsequent actual bridge deformation measurement. The precision of deformation detection of Rail Steel Bridge based on fog is better than 2mm.