The detection range of a semi-active laser guidance system can deviate significantly from the design value over a wide ambient temperature range. In this paper, a mathematical model of the detection range of a semi-active laser guidance system is built and the main factors affecting the detection range are analyzed. The parameter responsivity, which shows significant change, is found by applying the ambient temperature stress to the four-quadrant PIN detector and its signal processing chain. The relationship between the maximum detection range and ambient temperature is established based on a given signal-to-noise ratio, which is necessary for reliable detection. The target temperature and tolerance are setup for real-time temperature compensation for the four-quadrant PIN detector. The ambient temperature stress is applied to the system under compensation to verify the effect of compensation. The experimental results show that the ratio of the maximum variation of the detection range to the design point is 6.9% after the compensation is implemented when the ambient temperature changes from −40 °C to 60 °C, which is improved by 13.2% compared to that without compensation.