Identifying the metabolic and genetic changes that confer evolutionary novelty is essential for understanding the factors facilitating or constraining the occurrence of traits. We show that dimethyl disulfide (DMDS), a volatile compound that attracts saprophilous pollinators, is produced by a disulfide synthase (DSS) in the plant genus Asarum (Aristolochiaceae). DSS is derived from methanethiol oxidase (MTOX), an enzyme conserved among animals and plants, and similar DSS enzymes have independently evolved in two other plant genera. Three amino acid changes shared among the DSSs of independent origins were sufficient to cause a functional switch between MTOX and DSS. The small number of amino acid changes and the co-option of a highly conserved enzyme may explain why DMDS-emitting flowers are widespread among floral mimics.