Background. The predictive factors of prognosis in patients with pneumonia complicated with heart failure (HF) have not been fully investigated yet, especially with the use of next-generation sequencing (NGS) of metagenome. Methods. Patients diagnosed with pneumonia complicated with HF were collected and divided into control group and NGS group. Univariate and multivariate logistic regression and LASSO regression analysis were conducted to screen the predictive factors for the prognosis, followed by nomogram construction, ROC curve plot, and internal validation. Data analysis was conducted in SPSS and R software. Results. The NGS of metagenome detected more microbial species. Univariate and multivariate logistic regression and LASSO regression analysis revealed that Enterococcus (χ2 = 7.449,
P
= 0.006), Hb (Wals = 6.289,
P
= 0.012), and ProBNP (Wals = 4.037,
P
= 0.045) were screened out as potential predictive factors for the prognosis. Nomogram was constructed with these 3 parameters, and the performance of nomogram was checked in ROC curves (AUC = 0.772). The specificity and sensitivity of this model were calculated as 0.579 and 0.851, respectively, with the threshold of 0.630 in ROC curve. Further internal verification indicated that the predictive value of our constructed model was efficient. Conclusion. This study developed a preliminary clinical prediction model for the prognosis of pneumonia complicated with HF based on NGS of metagenome. More objects will be collected and tested to improve the predictive model in the near future.