Composite insulators are prone to produce internal defects in manufacturing and using, which can seriously endanger the safety operation of electrical equipment. Using a terahertz time-domain spectroscopy imaging system to detect internal defects is a new solution. Aiming at the problems of image blurring, difficulty in detecting tiny defects, and low defect identification efficiency in terahertz imaging systems for detecting mm-scale defects, this paper proposes a method based on terahertz imaging technology and an improved YOLOv11 model. By optimizing and improving the C3k2 module, up-sampling method, and loss function in YOLOv11 model, the types and locations of defect targets in terahertz images can be characterized and identified. Firstly, a three-layer composite insulation structure containing scratch defects, delamination defects, and void defects is fabricated. Then the experimental samples are imaged in terahertz power and absorbance. Finally, the improved YOLOv11 model is used to identify and locate the above defect targets. The experimental results show that, compared with traditional target detection methods, mAP is improved to 99.5%, precision and recall also reach 99.9%, and parameters are reduced to 2.46 M. The method can be extended to the detection of internal defects in other composite insulation structures.