Background: The profile of metal(loid)s in human milk is essential for infant growth and development, yet its impact on the development of the infant microbiota remains unclear. Elements, such as manganese, zinc, iron or copper, play crucial roles in influencing infant health. Aim: To investigate the metal(loid) content within human milk and its influence on the infant's gut microbiota within the first 2 months after birth. Methods: Human milk samples and infant stool samples from 77 mother-infant dyads in the MAMI cohort were collected at two time points: the early transitional stage and the mature stage. Metallomic profiling of human milk was conducted using inductively coupled plasma-mass spectrometry (ICP-MS). The infant gut microbiota was profiled through 16S rRNA amplicon sequencing and maternal-infant clinical data were available. Spearman's rank correlation coefficientsprovided insights into metal(loid)-microbiota relationships. Results: Independent cross-sectional analyses of mother-infant pairs at two time points, significant variations in metal concentrations and differences in microbial abundances and diversities were observed. Notably, Bifidobacterium genus abundance was higher during the mature lactation stage. During early lactation, we found a significant positive correlation between infant gut Corynebacterium and human milk nickel concentrations, and negative correlations between Veillonella spp. and antimony, and Enterobacter spp. and copper. Additionally, Simpson's diversity was negatively correlated with iron. In the mature lactation stage, we identified eleven significant correlations between metals and microbiota. Notably, Klebsiella genus showed multiple negative correlations with iron, antimony, and vanadium. Conclusion: Our study highlights the significance of metal(loid)-microbiota interactions in early infant development, indicating that infant gut Klebsiella genus may be particularly vulnerable to fluctuations in metal(loid) levels present in human milk, when compared to other genera. Future research should explore these interactions at a strain level and the implications on infant health and development. This trial was registered as NCT03552939.