We functionally demonstrated that NF-κB pathway activation in the brain, but not in the ventral nerve cord octopaminergic neurons, triggers an egg-laying drop in response to infection. Here, NFKB1 is linked to infection.