The biosynthesis of thioviridamide-like compounds has not been elucidated. Herein, we report that TvaF from the thioviridamide biosynthetic gene cluster is an FMN-dependent cysteine decarboxylase that transforms the C-terminal cysteine of precursor peptides into a thioenol motif and exhibits high substrate flexibility. We resolved the crystal structure of TvaF bound with FMN at 2.24 Å resolution. Key residues for FMN binding and catalytic activity of TvaF have been identified and evaluated by mutagenesis studies.