Lanthipeptides are ribosomally synthesized and post-translationally modified peptides that bear the characteristic lanthionine (Lan) or methyllanthionine (MeLan) thioether linkages. (Me)Lan moieties bestow lanthipeptides with robust stability and diverse antimicrobial, anticancer, and antiallodynic activities. Installation of (Me)Lan requires dehydration of serine and threonine residues to 2,3-dehydroalanine (Dha) and (Z)-2,3dehydrobutyrine (Dhb), respectively. LxmK and LxmY enzymes comprise the biosynthetic machinery of a newly discovered class V lanthipeptide, lexapeptide, and are proposed to catalyze the dehydration of serine and threonine residues in the precursor peptide. We demonstrate that LxmK and LxmY form a stable dehydratase complex to dehydrate precursor peptides. In addition, we present crystal structures of the LxmKY heterodimer, revealing structural and mechanistic features that enable iterative phosphorylation and elimination by the LxmKY complex. These findings provide molecular insights into class V lanthionine synthetases and lay the foundation for their applications as enzymatic tools in the biosynthesis of exquisitely modified peptides.