Background: The gut microbiome and fecal metabolites of breastfed infants changes during lactation, and are influenced by breast milk components. This study aimed to investigate dynamic associations of milk components with the infant gut microbiome and fecal metabolites throughout the lactation period in a mother–infant model.Methods: One month after delivery, breast milk and subsequent infant feces were collected in a pair for 5 months from a mother and an exclusively breastfed infant. Composition of the fecal microbiome was determined with 16S rRNA sequencing. Low-molecular-weight metabolites, including human milk oligosaccharides (HMOs), and antibacterial proteins were measured in feces and milk using 1H NMR metabolomics and enzyme-linked immunosorbent assays. The association of milk bioactive components with the infant gut microbiome and fecal metabolites was determined with Python clustering and correlation analyses.Results: The HMOs in milk did not fluctuate throughout the lactation period. However, they began to disappear in infant feces at the beginning of month 4. Notably, at this time-point, a bifidobacterium species switching (from B. breve to B. longum subsp. infantis) occurred, accompanied by fluctuations in several metabolites including acetate and butyrate in infant feces.Conclusions: Milk bioactive components, such as HMOs, might play different roles in the exclusively breastfed infants depending on the lactation period.