Intracranial hematoma, a severe brain injury caused by trauma or cerebrovascular disease, can result in blood accumulation and compression of brain tissue. Untreated cases can cause headaches, impaired consciousness, and even brain tissue damage or death. Therefore, early and accurate diagnosis is crucial. Traditional segmentation methods require physicians with extensive clinical experience and expertise to manually mark out the hematoma region, but for hematoma cases with irregular shapes and uneven grey levels, this process is cumbersome, and the segmentation results are not good. Existing deep learning‐based methods are more likely to perform binary segmentation, considering all hematomas as a class and segmenting them, but this segmentation cannot capture more detailed information and lacks the analysis of different types of hematomas. To address these problems, an ICH segmentation network combining CNN and Transformer Encoder is proposed for accurate segmentation of different types of hematomas. The network incorporated edge information and long‐range context into the segmentation process. Experimental results using the CQ500 dataset demonstrate comparable performance to existing methods, with mIoU (0.8705), TPR (0.9273), mAP (0.9300), and DSC (0.9286) as the best metrics achieved by this paper's method.