Abstract Maternal diet quality and quantity have significant impacts on both maternal and fetal health and development. The composition and function of the maternal gut microbiome is also significantly influenced by diet. However, little is known about the impact of gestational nutrient restriction on the maternal microbiome during early gestation, which is a critical stage for many developmental processes. Here, we evaluated the effects of dietary restriction and one-carbon metabolite (OCM) supplementation on the ruminal and vaginal microbiota of beef heifers during early pregnancy. For this, 32 beef heifers (approximately 14-month-old) were used in a 2 × 2 factorial experiment with main factors including targeted gain (CON; 0.45 kg/d gain vs. RES; -0.23 kg/d gain), and OCM supplementation (OCM vs. noOCM) (n = 8/treatment). OCM heifers received ruminal-protected methionine (20 g/day) and choline (60 g/day) daily via a fine-ground corn carrier, with weekly intramuscular injections of folate (320 mg) and vitamin B12 (20 mg). The noOCM heifers received only corn carrier and saline injections. Heifers were individually fed and began treatment at breeding (d 0) and remained on treatment until d 63 of gestation. Ruminal fluid and vaginal swab samples were collected at d -2, d 35, and d 63 (at necropsy). Microbiota from samples were assessed using 16S rRNA gene (V3-V4) sequencing. Overall community structure of the ruminal microbiota was affected by gain (PERMANOVA: R2 = 0.04, P < 0.0001), OCM (R2 = 0.013, P = 0.03), time (R2 = 0.16, P < 0.0001) and by their interactions (R2 = 0.08, P = 0.004). The greatest difference in ruminal microbial community structure was between RES and CON heifers (R2 ≥ 0.16, P ≤ 0.003) on d 63. Overall microbial richness (total ASVs) was greater in RES (2,900 vs. 2,737; P = 0.005) but was unaffected by OCM (P = 0.25). Analysis via MaAsLin2 revealed that phyla Firmicutes (31% vs. 22%), Actinobacteriota (0.65% vs. 0.36%) and Chloroflexi were enriched (P < 0.05) in RES heifers. Twenty-five of the 34 differentially abundant genera in the rumen microbiota, including Christensellaceae R7 (5.0% vs 2.6%), Lachnobacterium (2.0% vs. 0.46%), and Butyrivibrio were more relatively abundant in RES; whereas 9 genera including Prevotella (16.5% vs. 31.1%), Ruminococcus (1.6% vs. 2.5%) and Saccharofermentans (0.4% vs. 0.5%) were reduced in RES (P < 0.05) on d 63. Overall vaginal microbiota structure was affected by gain (R2 = 0.02, P = 0.023) and time (R2 = 0.34, P < 0.0001) but not OCM (P >0.05). Community structure of RES was distinct from CON (R2 = 0.16, P = 0.032) on d 63, but microbial community richness and diversity were not influenced by OCM (P > 0.05). On d 63, RES heifers had increased Actinobacteriota (30.5% vs. 17.7%), but reduced Proteobacteriota (6.2% vs. 9.4%) and Fusobacteriota (0.02% vs. 0.94%; P < 0.05). In summary, restricted dietary intake during early gestation induced significant alterations in the ruminal microbiota and its impact also extended to the vaginal microbiota. The composition of these two microbial communities remained largely unaffected by OCM supplement.