Summary: Spaceflight is physically demanding and can negatively affect astronauts’ health. It has been shown that the human gut microbiota and cardiac function are affected by spaceflight and simulated spaceflight. This study investigated the effects of the gut microbiota on simulated spaceflight-induced cardiac remodeling using 10° of head-down bed rest (HDBR) in rhesus macaques and 30° of hindlimb unloading (HU) in mice. The gut microbiota, fecal metabolites, and cardiac remodeling were markedly affected by HDBR in macaques and HU in mice, cardiac remodeling in control mice was affected by the gut microbiota of HU mice and that of HU mice was protected by the gut microbiota of control mice, and there was a correlation between cardiac remodeling and the gut microbial-derived metabolite trimethylamine N-oxide. These findings suggest that spaceflight can affect cardiac remodeling by modulating the gut microbiota and fecal metabolites.