Abstract Cardiovascular disease is one of the most significant causes of death globally, especially in regions where unhealthy diets are prevalent and dietary fibre intake is low. 1,2 Fibre, particularly prebiotic types that feed gut microbes, is essential for maintaining healthy gut microbial ecosystems. 3 One assumption has been that cardiovascular health relates directly to lifestyle choices in adult life. Here, we show in mice that some of these benefits operate from the prenatal stage and relate to the diet and gut microbiome of the mother. Intake of fibre during pregnancy shaped the mothers’ gut microbiome, which had a lasting founding effect on the offspring’s microbial composition and function. Maternal fibre intake during pregnancy significantly changed the cardiac cellular and molecular landscape in the offspring, protecting them against the development of cardiac hypertrophy, remodelling, and inflammation. These suggest a role for foetal exposure to maternal-derived gut microbial metabolites, which are known to cross the placenta and drive epigenetic changes. Maternal fibre intake led to foetal epigenetic reprogramming of the atrial natriuretic peptide gene ( Nppa ), protective against heart failure. These results underscore the importance of dietary intake and the gut microbiome of the mother during pregnancy for cardiovascular disease in the offspring.