Nerve trauma-induced toll-like receptor 7 (TLR7) expression level increases in primary sensory neurons in injured dorsal root ganglion (DRG) avails to neuropathic pain, but the reason is still unknown. In the current study, we showed that unilateral lumbar 4 (L4) spinal nerve ligation (SNL) upregulated CCAAT/enhancer-binding protein-β (C/EBPβ) expression in ipsilateral L4 DRG. Preventing this elevation attenuated the SNL-induced upregulation of TLR7 in the ipsilateral L4 DRG and inhibited cold/thermal hyperalgesia and mechanical allodynia. In injected DRG, mimicking nerve trauma-induced C/EBPβ upregulation increased TLR7 levels, augmented responses to cold/thermal/mechanical stimuli, and caused ipsilateral spontaneous pain with no SNL. Mechanistically, SNL upregulated binding of increased C/EBPβ to Tlr7 promoter in ipsilateral L4 DRG. Accorded that C/EBPβ could trigger the activation of Tlr7 promoter and co-expressed with Tlr7 mRNA in individual DRG neurons, our findings strongly suggest the role of C/EBPβ in nerve trauma-mediated TLR7 upregulation in injured primary sensory neurons.