Pain involves neuroimmune crosstalk, but the mechanisms of this remain unclear. Here we showed that the splenic T helper 2 (TH2) immune cell response is differentially regulated in male mice with acute versus chronic neuropathic pain and that acetylcholinergic neurons in the dorsal motor nucleus of the vagus (AChDMV) directly innervate the spleen. Combined in vivo recording and immune cell profiling revealed the following two distinct circuits involved in pain-mediated peripheral TH2 immune response: glutamatergic neurons in the primary somatosensory cortex (GluS1HL)→AChDMV→spleen circuit and GABAergic neurons in the central nucleus of the amygdala (GABACeA)→AChDMV→spleen circuit. The acute pain condition elicits increased excitation from GluS1HL neurons to spleen-projecting AChDMV neurons and increased the proportion of splenic TH2 immune cells. The chronic pain condition increased inhibition from GABACeA neurons to spleen-projecting AChDMV neurons and decreased splenic TH2 immune cells. Our study thus demonstrates how the brain encodes pain-state-specific immune responses in the spleen.