Due to the huge bandwidth of IR-UWB signal, the IR-UWB localization system can offer high time resolution to achieve centimeter localization accuracy, also with potential properties of through obstacles, which are unique advantages compared with other wireless indoor localization technologies. However, in complicated indoor environment, the non-line-of-sight (NLOS) propagation was the main reason to degradate the performance of localization, which is also important for IR-UWB localization system. Based on the Time-of-Arrival (TOA) ranging algorithm, the IR signal propagated through obstacle can introduce extra time delay, then caused the distance error in ranging estimation. This paper first analyzed the through wall propagation characteristics of IR-UWB signal from the electromagnetic theory, through the TOA triangular localization algorithm, the relationship between the distance estimation error and the transceiver distance was studied, the indoor environment was divided into three types: LOS/NLOS/NLOS2 according to the statistical distribution of channel status, a distance error modification model was proposed based on the ranging estimation. The simulation results shown that utilized the error modification model can apparently mitigated the distance error in actual indoor ranging environment, and with improved localization performance.