The random noise of a complementary metal-oxidesemiconductor (CMOS) image sensor is the main factor limiting the further improvement of high accuracy spot target detection. Accordingly, a window-adaptive centroiding method based on energy iteration is proposed in this paper. The method can effectively mitigate the problem of localization performance fluctuations caused by the random noise at the low-intensity pixels within the extraction window. By analyzing the centroiding error model and the random noise of CMOS detectors, simulations are used to deduce that pixel response random noise that remains after removing systematic errors is the main factor limiting further improvement in positioning accuracy. Based on the generally applicable threshold centroiding algorithm, the influence of the pixel response within the extraction window on the centroiding accuracy is derived according to the pixel energy and the pixel location relative to the target centroid. This leads to an iterative method which combines the pixels with better performance as a new extraction window and recalculates the target centroid. The effectiveness of the algorithm at the signal-to-noise ratio typical for real cases is simulated and analyzed. An experimental scheme is designed for the sub-pixel movement of point targets with a measurement platform based on a high-precision rotary table and a star tracker to validate our algorithm. Further real star experiment is conducted to verify the effectiveness of the algorithm. The results of the experiments indicate that the proposed method can reduce the random noise effect on spot extraction accuracy.