Bacteriophage transfer (lysogenic conversion) promotes bacterial virulence evolution. There is limited understanding of the factors that determine lysogenic conversion dynamics within infected hosts. A murine Salmonella Typhimurium (S.Tm) diarrhea model was used to study the transfer of SopEΦ, a prophage from S.Tm SL1344, to S.Tm ATCC14028S. Gut inflammation and enteric disease triggered >55% lysogenic conversion of ATCC14028S within 3 days. Without inflammation, SopEΦ transfer was reduced by up to 105-fold. This was because inflammation (e.g., reactive oxygen species, reactive nitrogen species, hypochlorite) triggers the bacterial SOS response, boosts expression of the phage antirepressor Tum, and thereby promotes free phage production and subsequent transfer. Mucosal vaccination prevented a dense intestinal S.Tm population from inducing inflammation and consequently abolished SopEΦ transfer. Vaccination may be a general strategy for blocking pathogen evolution that requires disease-driven transfer of temperate bacteriophages.