Bacterial toxins are able to act on neurons to modulate signaling and function. Here, we find that nociceptive sensory neurons that mediate pain are enriched in the receptor for anthrax toxins, ANTXR2. Anthrax Edema Toxin (ET) induced cAMP and PKA signaling in Nav1.8+ nociceptive neurons and modulated pain in vivo. Peripherally administered ET mediated mechanical allodynia in nave mice and during B. anthracis infection. Intrathecally administered ET produced analgesic effects, potently blocking pain-like behaviors in multiple mouse models of inflammatory and chronic neuropathic pain. Nociceptor-specific ablation of ANTXR2 attenuated ET-induced signaling and analgesia. Modified anthrax toxin successfully delivered exogenous protein cargo into nociceptive neurons, illustrating utility of the anthrax toxin system as a molecular platform to target pain. ET further induced signaling in human iPSC-derived sensory neurons. Our findings highlight novel interactions between a bacterial toxin and nociceptors that may be utilized for developing new pain therapeutics.