In this paper, a novel algorithm is presented for warhead recognition in the defense of ballistic missiles. The range profiles from the warheads of interest in typical illumination directions form a dataset. First, each range profile in the dataset is compared to the range profile of the target under observation, and the most similar range profile is found. Then, the observed target is considered as a warhead if the deviation of its range profile from the most similar range profile is less than or equal to a threshold. The threshold is chosen such that the detection rate is a constant. The simulation results verify the effectiveness of the proposed algorithm. Since the threshold is automatically calculated according to the detection rate, this algorithm has a larger applicability than the current methods based on range-profile matching.