Milk production is an ancient adaptation that unites all mammals. Milk contains a microbiome that can contribute to offspring health and microbial-immunological development. We generated a comprehensive milk microbiome dataset (16S rRNA gene) for the class Mammalia, representing 47 species from all placental superorders, to determine processes structuring milk microbiomes. We show that across Mammalia, milk exposes offspring to maternal bacterial and archaeal symbionts throughout lactation. Deterministic processes of environmental selection accounted for 20% of milk microbiome assembly processes; milk microbiomes were similar from mammals with the same host superorder (Afrotheria, Laurasiathera, Euarchontoglires, and Xenarthra: 6%), environment (marine captive, marine wild, terrestrial captive, and terrestrial wild: 6%), diet (carnivore, omnivore, herbivore, and insectivore: 5%), and milk nutrient content (sugar, fat, and protein: 3%). We found that diet directly and indirectly impacted milk microbiomes, with indirect effects being mediated by milk sugar content. Stochastic processes, such as ecological drift, accounted for 80% of milk microbiome assembly processes, which was high compared to mammalian gut and mammalian skin microbiomes (69% and 45%, respectively). Even amid high stochasticity and indirect effects, our results of direct dietary effects on milk microbiomes provide support for enteromammary trafficking, representing a mechanism by which bacteria are transferred from the mother’s gut to mammary gland and then to offspring postnatally. The microbial species present in milk reflect both selective pressures and stochastic processes at the host level, exemplifying various ecological and evolutionary factors acting on milk microbiomes, which, in turn, set the stage for offspring health and development.