The invention discloses a real-time navigation system and a real-time navigation method for an underwater structure detection robot. The navigation system comprises a magnetic compass, a gyroscope, an accelerometer, a depth meter and a navigation microprocessor, wherein the magnetic compass, the gyroscope, the accelerometer and the depth meter are used for respectively collecting magnetic field intensity, an angular speed, a linear speed and submerged depth data and transmitting the magnetic field intensity, the angular speed, the linear speed and the submerged depth data to the navigation microprocessor; the navigation microprocessor is used for calculating attitude and position of the underwater robot according to the collected data. The navigation method comprises an attitude algorithm, a speed algorithm and a depth algorithm; according to the attitude algorithm, a complementary filtering method, a quaternion gradient descent method and a Kalman algorithm are combined for obtaining an attitude matrix and an attitude angle; the speed algorithm is used for calculating the speed and the position of the robot by using a three-order upwind scheme with rotary compensation; the depth algorithm is used for processing the data of the depth meter by using a moving average filter algorithm so as to obtain the submerged depth. By virtue of the real-time navigation system for the underwater structure detection robot and the method thereof, the navigation cost is reduced and a relatively good navigation precision is achieved.