Human epidermal growth factor receptor 2 (HER2)-positive breast cancer and triple-negative breast cancer have their own genetic, epigenetic, and protein expression profiles. In the present study, based on bioinformatics techniques, we explored the prognostic targets of HER2-positive breast cancer from metabonomics perspective and developed a new risk score system to evaluate the prognosis of patients. By identifying the differences between HER2 positive and normal control tissues, and between triple negative breast cancer and normal control tissues, we found a large number of differentially expressed metabolic genes in patients with HER2-positive breast cancer and triple-negative breast cancer. Importantly, in HER2-positive breast cancer, decreased expression of metabolism-related genes ATIC, HPRT1, ASNS, SULT1A2, and HAL was associated with increased survival. Interestingly, these five metabolism-related genes can be used to construct a risk score system to predict overall survival (OS) in HER2-positive patients. The time-dependent receiver operating characteristic (ROC) curve analysis showed that the predictive sensitivity of the risk scoring system was higher than that of other clinical factors, including age, stage, and tumor node metastasis (TNM) stage. This work shows that specific transcriptional changes in metabolic genes can be used as biomarkers to predict the prognosis of patients, which is helpful in implementing personalized treatment and evaluating patient prognosis.