Significant progress has been made in recent years on exploring immunometabolism, a field that integrates two processes essential for maintaining tissue and organismal homeostasis, immunity and metabolism. The nematode parasiteHeterorhabditis gerrardi, its mutualistic bacteriaPhotorhabdus asymbiotica, and the fruit flyDrosophila melanogasterconstitute a unique system to investigate the molecular basis of host immunometabolic response to nematode-bacterial complexes. In this study, we explored the contribution of the two major immune signaling pathways, Toll and Imd, to sugar metabolism inD. melanogasterlarvae during infection withH. gerrardinematodes. We infected Toll or Imd signaling loss-of-function mutant larvae withH. gerrardinematodes and assessed larval survival ability, feeding rate, and sugar metabolism. We found no significant differences in the survival ability or levels of sugar metabolites in any of the mutant larvae when responding toH. gerrardiinfection. However, we found that the Imd mutant larvae have higher feeding rate than controls during the early stages of infection. In addition, feeding rates are lower in Imd mutants relative to the control larvae as the infection progresses. We further showed thatDilp2andDilp3gene expression increases in Imd mutants compared to controls early in the infection, but their expression levels decrease at later times. These findings indicate that Imd signaling activity regulates the feeding rate andDilp2andDilp3expression inD. melanogasterlarvae infected withH. gerrardi. Results from this study facilitate our understanding of the link between host innate immunity and sugar metabolism in the context of infectious diseases caused by parasitic nematodes.