The human immunodeficiency virus type 1 (HIV-1) nef gene encodes a 27-kDa protein that plays a crucial role during AIDS pathogenesis, but its exact functional mechanism has not been fully elucidated and remains controversial. The present study illuminated the in vivo functions of Nef using Drosophila, in which genetic analyses can be conveniently conducted. Using Drosophila transgenic lines for wild-type Nef, we demonstrated that Nef is not involved in the regulation of cell proliferation but rather specifically induces caspase-dependent apoptosis in wings in a cell-autonomous manner. Interestingly, myristoylation-defective Nef completely failed to induce the apoptotic wing phenotypes, consistent with previous reports demonstrating a crucial role for membrane localization of Nef in vivo. Further genetic and immunohistochemical studies revealed that Nef-dependent JNK activation is responsible for apoptosis. Furthermore, we found that ectopic expression of Nef inhibits Drosophila innate immune responses including Relish NF-kB activation with subsequent induction of an antimicrobial peptide, diptericin. The in vivo functions of Nef in Drosophila are highly consistent with those found in mammals and so we propose that Nef regulates evolutionarily highly conserved signaling molecules of the JNK and NF-kB signaling pathways at the plasma membrane, and consequently modulates apoptosis and immune responses in HIV target cells.