BACKGROUND: The melon fly, Zeugodacus cucurbitae (Coquillett), is a significant pest of fruit and vegetable crops. In the physiological processes of insects, N-β-phenylalanine dopamine synthase (ebony) plays a crucial role in insect physiology, with its activity depending on the interaction between dopamine and β-alanine. However, our understanding of ebony's specific biological functions of in melon flies remains limited. RESULTS: Our study demonstrates that transcripts of the Zcuc-ebony gene are expressed most abundantly during the pre-pupal and immature adult stages. Using the CRISPR/Cas9 technique, we successfully obtained a Zcuc-ebony knockout strain with an 8-base pair deletion in the wild-type (WT) strain. Compared with the WT strain, the cuticle coloration of both pupae and adults in the Zcuc-ebony knockout mutants was significantly darker. Hatching and eclosion rates were markedly lower in the mutants. Moreover, impaired locomotion behaviors were also observed in both adult and larval stages of the Zcuc-ebony knockout strain. Adults lacking functional Zcuc-ebony exhibited decreased copulation rates and egg numbers, particularly affecting mutant males. CONCLUSION: These results prove that the ebony gene is essential for regulating cuticular pigmentation, locomotion, and adult reproduction in melon flies. Our data provide a theoretical foundation for the development of pest control strategies targeting this gene against important pests in the Tephritid family. © 2025 Society of Chemical Industry.