Internal defect of cable is seriously endangering the operation of power grid. To detect the defect in time, a THz(terahertz) detection method combined with clustering algorithm was proposed in this paper. To extract feature from the original waves, frequency domain features and PCA were obtained. Further, the correlation of a feature in different sample sets was analyzed through Mann-Whitney U test. According to effect of clustering, features filtered by Mann-Whitney U test show good classification performance. Based on the clustering method of terahertz wave, the inner defective and normal conditions of cable insulation can be classified quickly and accurately.