Reciprocal signalling between immunocompetent cells in the central nervous system (CNS) has emerged as a key phenomenon underpinning pathological and chronic pain mechanisms. Neuronal excitability can be powerfully enhanced both by classical neurotransmitters derived from neurons, and by immune mediators released from CNS-resident microglia and astrocytes, and from infiltrating cells such as T cells. In this Review, we discuss the current understanding of the contribution of central immune mechanisms to pathological pain, and how the heterogeneous immune functions of different cells in the CNS could be harnessed to develop new therapeutics for pain control. Given the prevalence of chronic pain and the incomplete efficacy of current drugs--which focus on suppressing aberrant neuronal activity--new strategies to manipulate neuroimmune pain transmission hold considerable promise.