This research investigates the impact of nonlinear clearance factors on position tracking accuracy in the servo drive system of a harmonic reducer. The study introduces a technique for modeling and compensating for transmission errors, thereby improving position tracking accuracy through online compensation combined with an auto-disturbance rejection controller. Initially, the mathematical model of the permanent magnet synchronous motor is outlined, and the current loop and speed loop control models are derived. Subsequently, an electromechanical actuator (EMA) simulation model with clearance is established, and detailed simulation analysis is conducted to verify the impact of clearance on tracking accuracy. A model for online compensation of transmission errors is then developed. Following the principles of active disturbance rejection control (ADRC), a second-order ADRC is formulated for real-time compensation of transmission errors in EMA position mode. Finally, through no-load and load experiments, the change in position tracking error with and without transmission error compensation is compared and analyzed. The results demonstrate that utilizing automatic disturbance rejection control with transmission error compensation achieves the highest position tracking accuracy. Compared to the proportion integration differentiation (PID) control method, the root mean square of position tracking error is reduced by approximately 12.8% and 17.3% under no-load and load conditions, respectively. By compensating for position errors online, the accuracy of the EMA position can be improved.