Septic cardiomyopathy is a life-threatening complication of severe sepsis and septic shock. Oxidative stress and mitochondrial dysfunction have been identified as significant abnormalities in septic cardiomyopathy. However, specific treatments are rare. This study aims to investigate the impact of β-hydroxybutyrate (β-OHB) on septic cardiomyopathy and explore the underlying mechanism(s). We found that pretreatment of D-β-hydroxybutyrate-(R)-1,3 butanediol monoester (ketone ester, 3 mg/g body weight, once daily) by gavage for three days elevated the levels of ketone bodies, especially that of β-hydroxybutyrate (β-OHB) in the circulation and mouse hearts, which exerted a protective effect against lipopolysaccharide (LPS, 20 mg/kg)-induced septic cardiomyopathy in mice. In addition, an LPS-stimulated macrophage-conditioned medium (MCM) was used to mimic the pathological process of septic cardiomyopathy. Mechanistically, β-OHB alleviated myocardial oxidative stress and improved mitochondrial respiratory function through the antioxidant FoxO3a/MT2 pathway activated via histone deacetylase (HDAC) inhibition, which ultimately enhanced heart performance in septic cardiomyopathy. Our results, therefore, suggested an unappreciated critical role of β-OHB in septic heart protection as well as highlighted the potential of β-OHB as a simple remedy for the septic cardiomyopathy population.