Output feedback tracking control of spacecraft attitude motion with disturbance rejection is investigated, where the attitude model is described by the unit quaternion. Firstly, based on the attitude model and combination of the characteristics of the unit quaternion, extended state observer (ESO) is designed to estimate angular velocity and disturbance torque. The unit quaternion state in the ESO is assured to satisfy norm constraint, and convergence of observation error is proved in theory. Furthermore, interconnection and damping assignment passivity-based control (IDA--PBC) theory is utilized to design the control law. By transformation of attitude and angular velocity error state and introduction of error integral terms, the damping terms appear among dynamic equations of desired attitude error, angular velocity error and error integral term. The disturbance rejection performance is then increased. Finally, proof of the uniform ultimate bounded stability of closed system is given within Lyapunov function framework. Simulation results demonstrate effectiveness of the designed ESO and IDA--PBC control law. © 2017, Editorial Department of Control Theory & Applications South China University of Technology. All right reserved.