In order to realize the simulation testing and calibration of star tracker in the lab, a simulation algorithm for dynamic and celestial sphere star image was proposed. This algorithm could complete simulation of star image at any time and any visual axis point, also could realize in-orbit simulation according to a given track. A new method of space district dividing was also presented in order to improve the traditional method of space district dividing by ascension and declination, fully considered declination arc length gradually shortened with latitude increasing. It can remarkably enhance the updating frequency simulation star image.