Abstract The low-frequency periodic error of star tracker is one of the most critical problems for high-accuracy satellite attitude determination. In this paper an approach is proposed to identify and compensate the low-frequency periodic error for star tracker in attitude measurement. The analytical expression between the estimated gyro drift and the low-frequency periodic error of star tracker is derived firstly. And then the low-frequency periodic error, which can be expressed by Fourier series, is identified by the frequency spectrum of the estimated gyro drift according to the solution of the first step. Furthermore, the compensated model of the low-frequency periodic error is established based on the identified parameters to improve the attitude determination accuracy. Finally, promising simulated experimental results demonstrate the validity and effectiveness of the proposed method. The periodic error for attitude determination is eliminated basically and the estimation precision is improved greatly.