BackgroundAcute viral myocarditis (AVMC) is an inflammatory disease of the myocardium. Evidence indicates that dysbiosis of gut microbiome and related metabolites intimately associated with cardiovascular diseases through the gut-heart axis.MethodsWe built mouse models of AVMC, then applied 16 S rDNA gene sequencing and UPLC-MS/MS metabolomics to explore variations of gut microbiome and disturbances of cardiac metabolic profiles.ResultsCompared with Control group, analysis of gut microbiota showed lower diversity in AVMC, decreased relative abundance of genera mainly belonging to the phyla Bacteroidetes, and increased of phyla Proteobacteria. Metabolomics analysis showed disturbances of cardiac metabolomics, including 62 increased and 84 decreased metabolites, and mainly assigned to lipid, amino acid, carbohydrate and nucleotide metabolism. The steroid hormone biosynthesis, cortisol synthesis and secretion pathway were particularly enriched in AVMC. Among them, such as estrone 3-sulfate, desoxycortone positively correlated with disturbed gut microbiome.ConclusionIn summary, both the structure of the gut microbiome community and the cardiac metabolome were significantly changed in AVMC. Our findings suggest that gut microbiome may participate in the development of AVMC, the mechanism may be related to its role in dysregulated metabolites such as steroid hormone biosynthesis.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12866-023-02863-4.