Apart from their role in cellular immunity via phagocytosis and encapsulation, Drosophila hemocytes release soluble factors such as antimicrobial peptides, and cytokines to induce humoral responses. In addition, they participate in coagulation and wounding, and in development. To assess their role during infection with entomopathogenic nematodes, we depleted plasmatocytes and crystal cells, the two classes of hemocytes present in naïve larvae by expressing proapoptotic proteins in order to produce hemocyte-free (Hml-apo, originally called Hemoless) larvae. Surprisingly, we found that Hml-apo larvae are still resistant to nematode infections. When further elucidating the immune status of Hml-apo larvae, we observe a shift in immune effector pathways including massive lamellocyte differentiation and induction of Toll- as well as repression of imd signaling. This leads to a pro-inflammatory state, characterized by the appearance of melanotic nodules in the hemolymph and to strong developmental defects including pupal lethality and leg defects in escapers. Further analysis suggests that most of the phenotypes we observe in Hml-apo larvae are alleviated by administration of antibiotics and by changing the food source indicating that they are mediated through the microbiota. Biochemical evidence identifies nitric oxide as a key phylogenetically conserved regulator in this process. Finally we show that the nitric oxide donor L-arginine similarly modifies the response against an early stage of tumor development in fly larvae.