A natural product containing an acylsulfenic acid functional group was discovered in a marine Streptomyces bacterium. Its biosynthesis is orchestrated by enzymes from both primary and secondary metabolism, including a flavin-dependent S-hydroxylase. The prevalence of enzymes catalysing the production of acylsulfenic acid in bacteria implies a potentially broad distribution of this functional group in specialized metabolites.