Modern agriculture has dramatically changed the distribution of animal species on Earth. Changes to host ecology have a major impact on the microbiota, potentially increasing the risk of zoonotic pathogens being transmitted to humans, but the impact of intensive livestock production on host-associated bacteria has rarely been studied. Here, we use large isolate collections and comparative genomics techniques, linked to phenotype studies, to understand the timescale and genomic adaptations associated with the proliferation of the most common food-born bacterial pathogen (Campylobacter jejuni) in the most prolific agricultural mammal (cattle). Our findings reveal the emergence of cattle specialist C. jejuni lineages from a background of host generalist strains that coincided with the dramatic rise in cattle numbers in the 20th century. Cattle adaptation was associated with horizontal gene transfer and significant gene gain and loss. This may be related to differences in host diet, anatomy, and physiology, leading to the proliferation of globally disseminated cattle specialists of major public health importance. This work highlights how genomic plasticity can allow important zoonotic pathogens to exploit altered niches in the face of anthropogenic change and provides information for mitigating some of the risks posed by modern agricultural systems.