The gut microbiome and its metabolites are increasingly implicated in several cardiovascular diseases, but their role in human myocardial infarction (MI) injury responses have yet to be established. To address this, we examined stool samples from 77 ST-elevation MI (STEMI) patients using 16 S V3-V4 next-generation sequencing, metagenomics and machine learning. Our analysis identified an enriched population of butyrate-producing bacteria. These findings were then validated using a controlled ischemia/reperfusion model using eight nonhuman primates. To elucidate mechanisms, we inoculated gnotobiotic mice with these bacteria and found that they can produce beta-hydroxybutyrate, supporting cardiac function post-MI. This was further confirmed using HMGCS2-deficient mice which lack endogenous ketogenesis and have poor outcomes after MI. Inoculation increased plasma ketone levels and provided significant improvements in cardiac function post-MI. Together, this demonstrates a previously unknown role of gut butyrate-producers in the post-MI response.