In this paper, we describe a rotation angle measurement system (RAMS) based on an inertial measurement unit (IMU) developed to measure the rotation angle of a movable surface. The existing IMU-based attitude (tilt) sensor can only accurately measure the rotation angle when the rotation axis of the movable surface is perfectly aligned with the X axis or Y axis of the sensor, which is always not possible in real-world engineering. To overcome the difficulty of sensor installation and ensure measurement accuracy, first, we build a model to describe the relationship between the rotation axis and the IMU. Then, based on the built model, we propose a simple online method to estimate the direction of the rotation axis without using a complicated apparatus and a method to estimate the rotation angle using the known rotation axis based on the extended Kalman filter (EKF). Using the estimated rotation axis direction, we can effectively eliminate the influence of the mounting position on the measurement results. In addition, the zero-velocity detection (ZVD) technique is used to ensure the reliability of the rotation axis direction estimation and is used in combination with the EKF as the switching signal to adaptively adjust the noise covariance matrix. Finally, the experimental results show that the developed RAMS has a static measurement error of less than 0.05° and a dynamic measurement error of less than 1° in the range of ±180°.