Aflatoxins are polyaromatic mycotoxins that contaminate a range of food crops as a result of fungal growth and contribute to serious health problems in the developing world because of their toxicity and mutagenicity. Although relatively resistant to biotic degradation, aflatoxins can be metabolized by certain species of Actinomycetales. However, the enzymatic basis for their breakdown has not been reported until now. We have identified nine Mycobacterium smegmatis enzymes that utilize the deazaflavin cofactor F420H2 to catalyse the reduction of the α,β-unsaturated ester moiety of aflatoxins, activating the molecules for spontaneous hydrolysis and detoxification. These enzymes belong to two previously uncharacterized F420H2 dependent reductase (FDR-A and -B) families that are distantly related to the flavin mononucleotide (FMN) dependent pyridoxamine 5'-phosphate oxidases (PNPOxs). We have solved crystal structures of an enzyme from each FDR family and show that they, like the PNPOxs, adopt a split barrel protein fold, although the FDRs also possess an extended and highly charged F420H2 binding groove. A general role for these enzymes in xenobiotic metabolism is discussed, including the observation that the nitro-reductase Rv3547 from Mycobacterium tuberculosis that is responsible for the activation of bicyclic nitroimidazole prodrugs belongs to the FDR-A family.