Epidemic and pandemic clones of bacterial pathogens with distinct characteristics continually emerge, replacing those previously dominant through mechanisms that remain poorly characterized. Here, whole-genome-sequencing-powered epidemiology linked horizontal transfer of a virulence gene, sopE, to the emergence and clonal expansion of a new epidemic Salmonella enterica serovar Typhimurium (S. Typhimurium) clone. The sopE gene is sporadically distributed within the genus Salmonella and rare in S. enterica Typhimurium lineages, but was acquired multiple times during clonal expansion of the currently dominant pandemic monophasic S. Typhimurium sequence type (ST) 34 clone. Ancestral state reconstruction and time-scaled phylogenetic analysis indicated that sopE was not present in the common ancestor of the epidemic clade, but later acquisition resulted in increased clonal expansion of sopE-containing clones that was temporally associated with emergence of the epidemic, consistent with increased fitness. The sopE gene was mainly associated with a temperate bacteriophage mTmV, but recombination with other bacteriophage and apparent horizontal gene transfer of the sopE gene cassette resulted in distribution among at least four mobile genetic elements within the monophasic S. enterica Typhimurium ST34 epidemic clade. The mTmV prophage lysogenic transfer to other S. enterica serovars in vitro was limited, but included the common pig-associated S. enterica Derby (S. Derby). This may explain mTmV in S. Derby co-circulating on farms with monophasic S. Typhimurium ST34, highlighting the potential for further transfer of the sopE virulence gene in nature. We conclude that whole-genome epidemiology pinpoints potential drivers of evolutionary and epidemiological dynamics during pathogen emergence, and identifies targets for subsequent research in epidemiology and bacterial pathogenesis.