The capacity for some pathogens to jump into different host-species populations is a major threat to public health and food security. Staphylococcus aureus is a multi-host bacterial pathogen responsible for important human and livestock diseases. Here, using a population-genomic approach, we identify humans as a major hub for ancient and recent S. aureus host-switching events linked to the emergence of endemic livestock strains, and cows as the main animal reservoir for the emergence of human epidemic clones. Such host-species transitions are associated with horizontal acquisition of genetic elements from host-specific gene pools conferring traits required for survival in the new host-niche. Importantly, genes associated with antimicrobial resistance are unevenly distributed among human and animal hosts, reflecting distinct antibiotic usage practices in medicine and agriculture. In addition to gene acquisition, genetic diversification has occurred in pathways associated with nutrient acquisition, implying metabolic remodelling after a host switch in response to distinct nutrient availability. For example, S. aureus from dairy cattle exhibit enhanced utilization of lactose—a major source of carbohydrate in bovine milk. Overall, our findings highlight the influence of human activities on the multi-host ecology of a major bacterial pathogen, underpinned by horizontal gene transfer and core genome diversification.