Human milk is the optimal nutrition source for infants, and oligosaccharides represent the third most abundant component in milk after lactose and fat. Human milk oligosaccharides (HMO) are favorable macromolecules which are, interestingly, indigestible by the infant but serve as substrates for bacteria. Hypothesizing that the maternal diet itself might influence HMO composition, we sought to directly determine the effect maternal diet on HMO and the milk bacteria. Employing a human cross-over study design, we demonstrate that distinct maternal dietary carbohydrate and energy sources preferentially alter milk concentrations of HMO, including fucosylated species. We find significant associations between the concentration of HMO-bound fucose and the abundance of fucosidase (a bacterial gene that digests fucose moieties) harbored by milk bacteria. These studies reveal a successive mechanism by which the maternal diet during lactation alters milk HMO composition, which in turn shapes the functional milk microbiome prior to infant ingestion.