Image segmentation is an important component of image processing. The improvements of the segmentation efficiency and quality are the two significant issues for each segmentation algorithm. This paper proposed a segmentation algorithm based on the negative selection mechanism of the artificial immune system. The algorithm can extract the occluded target in an infrared image by using a template constructed from negative selection method. A segmentation algorithm combined with the information entropy and the clonal selection algorithm is introduced to avoid the drawbacks of deciding a segmentation threshold subjectively. The simulation results presented that the two proposed algorithms do have some advantages on the segmentation of the occluded target in an infrared image, especially the latter can acquire a stable result leading to an ideal effect.