The microbial cleavage of dimethylsulfoniopropionate (DMSP) generates volatile dimethyl sulfide (DMS) and is an important step in global sulfur and carbon cycles. DddP is a DMSP lyase in marine bacteria, and the deduced dddP gene product is abundant in marine metagenomic data sets. However, DddP belongs to the M24 peptidase family according to sequence alignment. Peptidases hydrolyze C-N bonds, but DddP is deduced to cleave C-S bonds. Mechanisms responsible for this striking functional shift are currently unknown. We determined the structures of DMSP lyase RlDddP (the DddP from Ruegeria lacuscaerulensis ITI_1157) bound to inhibitory 2-(N-morpholino) ethanesulfonic acid or PO4 (3-) and of two mutants of RlDddP bound to acrylate. Based on structural, mutational and biochemical analyses, we characterized a new ion-shift catalytic mechanism of RlDddP for DMSP cleavage. Furthermore, we suggested the structural mechanism leading to the loss of peptidase activity and the subsequent development of DMSP lyase activity in DddP. This study sheds light on the catalytic mechanism and the divergent evolution of DddP, leading to a better understanding of marine bacterial DMSP catabolism and global DMS production.