Mycobacterium marinum is a pathogenic mycobacterial species closely related to Mycobacterium tuberculosis. In this study, we established a mycobacterial infection model of Drosophila melanogaster to characterize the role played by cg6568, a homolog of the human cathelicidin gene, in the innate defense against infection. Drosophila cg6568 was expressed at various levels during all developmental stages, and the expression levels were modulated by M. marinum in a time-dependent manner. 20-hydroxyecdysone induced Drosophila cg6568 transcription both in vitro and in vivo. Using flies expressing cg6568 RNAi, we found that cg6568 was essential both for D. melanogaster survival and the exertion of antimicrobial effects during M. marinum infection. Thus, we named the gene product a cathelicidin-like antimicrobial protein of D. melanogaster (dCAMP). Our results indicate that dCAMP is crucial in terms of the innate D. melanogaster defense during M. marinum infection.