Infrared Guidance Hardware-in-loop Simulation technology has great significance In the aerospace. Further research of the simulation system had been made by many institutions and scientists both at home and abroad. In this text, based on the infrared theory and the optical configuration of infrared hardware-in-loop simulation system, the equivalent model of target and background infrared radiation is established, describing a infrared background modeling method. Then the brightness and radiation difference between the target and backgroud under test was calculated to measure parameter of infrared radiation characteristic of close and remote target. Simulation results show that ranging error caused by the environment can be avoided effectively and the ranging accuracy will be improved sequentially through ruducing the background temperature of infrared simulation system.