In this study, we employed bioinformatics and machine learning methods to identify four potential diagnostic biomarkers for HF, namely, HMGN2, HTRA1, MFAP4, and MYH6. Using ROC curve analysis and nomogram construction, we developed diagnostic and predictive models that demonstrated excellent diagnostic performance and HF risk prediction capabilities. The gene discussed is HTRA1; the disease is hydrops fetalis.