BACKGROUND The escalating medical burden associated with stroke poses a substantial challenge, characterized by a skewed distribution wherein a minority of high-cost patients accounts for a disproportionate share of healthcare expenditures. Consequently, the timely and accurate identification of this cohort is paramount for optimizing the quality of care and mitigating unnecessary resource utilization. OBJECTIVE This study aims to construct a comorbidity network for stroke patients using hospital discharge data, extract topological features characterizing disease interactions, and integrate these features with machine learning algorithms to establish a robust and clinically interpretable framework for the accurate identification of high-cost stroke patients. METHODS We conducted a retrospective study using hospital discharge data from 10,301 stroke inpatients at a tertiary hospital in Northeast China between 2021 and 2023. Data from the 2021–2022 period were used to construct two specific networks: the Phenotypic Comorbidity Network (PCN) and the Distance-based Disease Cost Network (DDCN). From these networks, topological features were extracted to capture latent associations between comorbidities and high costs. The 2023 dataset was subsequently partitioned into training and testing sets to develop five machine learning models, including Logistic Regression (LR), Support Vector Machine (SVM), Neural Network (NN), Random Forest (RF), and XGBoost, for the identification of high-cost stroke inpatients. Furthermore, the SHAP method was applied to elucidate both the global and local contributions of the model features. RESULTS The integration of network features significantly improved model performance, with XGBoost exhibiting superior predictive capability (AUC = 0.911). Global feature importance analysis indicated that network features accounted for the majority of the total contribution (52.8%). Specifically, Shortest Distance (SD), length of stay, Normalized High-Cost Propensity (NHCP), age, and insurance type were identified as the top five predictors of high-cost risk. Moreover, SHAP interaction analysis revealed the phasic heterogeneity inherent in patient resource utilization. CONCLUSIONS Our comprehensive framework, integrating comorbidity network analysis with machine learning algorithms, significantly enhances the identification of high-cost stroke inpatients. These findings highlight the framework's potential utility in optimizing healthcare resource allocation and enabling proactive cost containment strategies. CLINICALTRIAL Not applicable