A common digestive system cancer with a dismal prognosis and a high death rate globally is breast cancer (BRCA). BRCA recurrence, metastasis, and medication resistance are all significantly impacted by cancer stem cells (CSCs). However, the relationship between CSCs and the tumor microenvironment in BRCA individuals remains unknown, and this information is critically needed. Our research utilized bioinformatics techniques and TCGA data to explore the complex relationship between CSCs and BRCA development. We identified 26 stem cell gene sets from the Stem Checker database and classified BRCA samples into stemness subtypes using consensus clustering. Prognosis, tumor microenvironment (TME) elements, and treatment responses varied across subtypes. Using LASSO, Cox regression, and differential expression analysis, we developed a stemness-risk model. BRCA patients were divided into two groups (Cluster A and Cluster B). Cluster B exhibited an improved prognosis, higher PIK3CA mutation frequency, and increased levels of CD8 T cells and regulatory Tregs. A 5-gene stemness model was constructed, showing that higher stemness scores correlated with poorer prognosis. The model was validated using the METABRIC cohort data from cBioPortal. Our findings identify two stemness-related subgroups with distinct prognoses and TME patterns. Further experimental validation is necessary before this model can be considered for clinical application.© 2025. The Author(s).