This study focuses on HF—a primary driver of global cardiovascular mortality—and systematically elucidates the cascade mechanism by which dysregulated glycolysis/ketone body metabolism drives metabolic-immune microenvironment imbalance through the core hub gene TIMP1, integrating bioinformatics, machine learning, and experimental validation. The gene discussed is TIMP1; the disease is hydrops fetalis.