Body pigmentation is an important character of insects in adapting to biotic and abiotic environmental challenges. Additionally, based on the relative ease of screening, several genes involved in insect melanization have been used in classic genetic studies or as visual markers in constructing transgenic insects. Here, a homologue of the Bombyx mori melanization-inhibiting gene ebony, associated with the conversion of dopamine to N-β-alanyl dopamine, was identified in a global pest, Plutella xylostella. The CRISPR/Cas9 system was applied to generate multiple Pxebony knockout alleles which were crossed to produce a Pxebony knockout strain, showing darker pigmentation in larvae, pupae and adults, compared with wildtype. Interestingly, we observed that Pxebony heterozygotes displayed an intermediate darkened phenotype, indicating partial dominance between the knockout and wildtype alleles. The fitness costs of Pxebony deficiency were also assessed in the mutant strain, indicating that embryo hatchability and larval survival were significantly reduced, while the eclosion rate was not obviously affected. Our work provides a potential target for exploring CRISPR-based genetics-control systems in this economically important pest lepidopteran.