BACKGROUND: This study aims to introduce the concept of habitat subregions and construct an accurate prediction model by analyzing refined medical images, to predict lymph node metastasis (LNM) in patients with intrahepatic cholangiocarcinoma (ICC) before surgery, and to provide personalized support for clinical decision-making. METHODS: Clinical, radiological, and pathological data from ICC patients were retrospectively collected. Using information from the arterial and venous phases of multisequence CT images, tumor habitat subregions were delineated through the K-means clustering algorithm. Radiomic features were extracted and screened, and prediction models based on different subregions were constructed and compared with traditional intratumoral models. Finally, a lymph node metastasis prediction model was established by integrating the features of several subregional models, and its performance was evaluated. RESULTS: A total of 164 ICC patients were included in this study, 103 of whom underwent lymph node dissection. The patients were divided into LNM- and LNM + groups on the basis of lymph node status, and significant differences in white blood cell indicators were found between the two groups. Survival analysis revealed that patients with positive lymph nodes had significantly worse prognoses. Through cluster analysis, the optimal number of habitat subregions was determined to be 5, and prediction models based on different subregions were constructed. A comparison of the performance of each model revealed that the Habitat1 and Habitat5 models had excellent performance. The optimal model obtained by fusing the features of the Habitat1 and Habitat5 models had AUC values of 0.923 and 0.913 in the training set and validation set, respectively, demonstrating good predictive ability. Calibration curves and decision curve analysis further validated the superiority and clinical application value of the model. CONCLUSIONS: This study successfully constructed an accurate prediction model based on habitat subregions that can effectively predict the lymph node metastasis of ICC patients preoperatively. This model is expected to provide personalized decision support to clinicians and help to optimize treatment plans and improve patient outcomes.