Star trackers are susceptible to interference from stray light, such as sunlight, moonlight, and Earth atmosphere light, in the space environment, resulting in an overall improvement in the star image grayscale, poor background uniformity, low star extraction rate, and high number of false star spots. In response to these challenges, this paper proposes a grayscale iterative star spot extraction algorithm based on image entropy. The implementation of the algorithm is mainly divided into two steps: (1) The algorithm conducts multiple grayscale iterations, effectively utilizing the prior information on the local contrast of star spots to filter out stray light backgrounds to a certain extent. (2) By establishing an inner–outer template, the image entropy algorithm is employed to obtain the real star targets to be extracted, which further suppresses the background clutter and noise. Numerical simulations and experimental results demonstrate that, compared to traditional detection algorithms, this algorithm can effectively suppress background stray light, enhance star extraction rates, and reduce the number of false star spots, and it exhibits superior detection performance in complex backgrounds across various scenarios.