Epidithiodiketopiperazines (ETPs) are a class of ecologically and medicinally important cyclodipeptides bearing a reactive transannular disulfide bridge. Aspirochlorine, an antifungal and toxic ETP isolated from Aspergillus oryzae used in sake brewing, deviates from the common ETP scaffold owing to its unusual ring-enlarged disulfide bridge linked to a spiroaminal ring system. Although this disulfide ring system is implicated in the biological activity of ETPs the biochemical basis for this derailment has remained a mystery. Here we report the discovery of a novel oxidoreductase (AclR) that represents the first-in-class enzyme catalyzing both a carbon-sulfur bond migration and spiro-ring formation, and that the acl pathway involves a cryptic acetylation as a prerequisite for the rearrangement. Genetic screening in A. oryzae identified aclR as the candidate for the complex biotransformation, and the aclR-deficient mutant provided the biosynthetic intermediate, unexpectedly harboring an acetyl group. In vitro assays showed that AclR alone promotes 1,2-sulfamyl migration, elimination of the acetoxy group, and spiroaminal formation. AclR features a thioredoxin oxidoreductase fold with a noncanonical CXXH motif that is distinct from the CXXC in the disulfide forming oxidase for the ETP biosynthesis. Crystallographic and mutational analyses of AclR revealed that the CXXH motif is crucial for catalysis, whereas the flavin-adenine dinucleotide is required as a support of the protein fold, and not as a redox cofactor. AclR proved to be a suitable bioinformatics handle to discover a number of related fungal gene clusters that potentially code for the biosynthesis of derailed ETP compounds. Our results highlight a specialized role of the thioredoxin oxidoreductase family enzyme in the ETP pathway and expand the chemical diversity of small molecules bearing an aberrant disulfide pharmacophore.