Entomopathogenic fungi have been used for biocontrol of insect pests for many decades. However, the efficacy of such fungi in field trials is often inconsistent, mainly due to environmental stresses, such as UV radiation, temperature extremes, and desiccation. To circumvent these hurdles, metabolic engineering of dihydroxynaphthalene (DHN) melanin biosynthetic genes (polyketide synthase, scytalone dehydratase, and 1,3,8-trihydroxynaphthalene reductase genes) cloned from Alternaria alternata were transformed into the amelanotic entomopathogenic fungus Metarhizium anisopliae via Agrobacterium-mediated transformation. Melanin expression in the transformant of M. anisopliae was verified by spectrophotometric methods, liquid chromatography/mass spectrometry (LC/MS), and confocal microscopy. The transformant, especially under stresses, showed notably enhanced antistress capacity and virulence, in terms of germination and survival rate, infectivity, and reduced median time to death (LT 50 ) in killing diamondback moth (Plutella xylostella) larvae compared with the wild type. The possible mechanisms in enhancing the stress tolerance and virulence, and the significance and potential for engineering melanin biosynthesis genes in other biocontrol agents and crops to improve antistress fitness are discussed.Although chemical pesticides can kill a wide range of insect pests rapidly and cost-effectively, their side effects over time are problematic. The selective pressure from long-term application of chemical pesticides ultimately leads to pesticide resistance, harm to the ecosystem, and residual poisonous effects on humans and animals (9).