In this paper, we analyze and compare electrical compensation and deep level defects in semi-insulating (SI) materials prepared by Fe-doping and high temperature annealing of undoped InP. Influence of deep level defects in the SI-InP materials on the electrical compensation has been studied thermally stimulated current spectroscopy (TSC). Electrical property of the Fe-doped SI-InP is deteriorated due to involvement of a high concentration of deep level defects in the compensation. In contrast, the concentration of deep defects is very low in high temperature annealed undoped SI-InP in which Fe acceptors formed by diffusion act as the only compensation centre to pin the Fermi level, resulting in excellent electrical performance. A more comprehensive electrical compensation model of SI-InP has been given based on the research results.