Bacterial infections upregulated the transcription of nitric oxide synthase 1/2 (NOS1/2), CanA and AMP genes and increased NO concentration in larval hemolymph. Here, NOS1 is linked to bacterial infectious disease.