Shiga toxin (Stx)-producing Escherichia coli (STEC) causes serious gastrointestinal illness, including hemorrhagic colitis and hemolytic uremic syndrome. Although all known Stxs (Stx1 and Stx2) are encoded by bacteriophages (Stx phages), the production of Stx2 is known to be a major risk factor for severe STEC infections. The production of Stx2, but not Stx1, is tightly coupled with the induction of Stx phages, and Stx2 production levels vary between STEC strains, even within the same serotype. Here, we analyzed the genomic diversity of all Stx phages in 71 strains representing the entire O145:H28 lineage, one of the major STECs. Our analysis revealed the highly dynamic nature of the Stx phages in O145:H28, including the independent acquisition of similar Stx phages by different sublineages and the frequent changes in Stx phages in the same sublineages due to the gain and loss of Stx phages. Analyses of Stx2 production levels in O145:H28 strains and K-12 lysogens of Stx2 phages of specific groups and types, which were defined by their early region sequences and CI repressors, respectively, revealed that short-tailed Stx2a phages (S-Stx2a phages) confer significantly greater Stx2 production to host strains than long-tailed Stx2a phages (L-Stx2a phages). However, L-Stx2a phages that encode a specific type of CI repressor promoted Stx2 production, comparable to the level of production among S-Stx2a phages, as well as promoted virulence to host strains, exceeding the level among other L-Stx2a phages. We also showed a clear link between the phage induction efficiency, which was primarily determined by the early region of each phage, and the level of Stx2 production by host strains. These results provide important insights into the diversification and dynamism of Stx phages and the relationship between the variations in Stx2 phages and the amount of Stx2 production by their host strains.