Breast cancer patients at the same stage may show different clinical prognoses or different therapeutic effects of systemic therapy. Differentially expressed genes of breast cancer were identified from GSE42568. Through survival, receiver operating characteristic (ROC) curve, random forest, GSVA and a Cox regression model analyses, genes were identified that could be associated with survival time in breast cancer. The molecular mechanism was identified by enrichment, GSEA, methylation and SNV analyses. Then, the expression of a key gene was verified by the TCGA dataset and RT-qPCR, Western blot, and immunohistochemistry. We identified 784 genes related to the 5-year overall survival time of breast cancer. Through ROC curve and random forest analysis, 10 prognostic genes were screened. These were integrated into a complex by GSVA, and high expression of the complex significantly promoted the recurrence-free survival of patients. In addition, key genes were related to immune and metabolic-related functions. Importantly, we identified methylation of MEX3A and TBC1D 9 and mutations events. Finally, the expression of UGCG was verified by the TCGA dataset and by experimental methods in our own samples. These results indicate that 10 genes may be potential biomarkers and therapeutic targets for long-term survival in breast cancer, especially UGCG.