Microglia activation in the spinal cord play a major role in the pathogenesis of neuropathic pain. The p38 mitogen-activated protein kinase (MAPK) regulates microglia activation. Previously, 2′,3′-dideoxycytidine (ddC), a nucleoside reverse transcriptase inhibitor (NRTI), was found to induce mechanical allodynia and microglia activation in the spinal cords of male and female mice. In this study, we investigated the role of spinal microglia and p38 MAPK signaling in the development of mechanical allodynia using immunofluorescence staining and treatment with microglia and p38 MAPK inhibitors in both sexes. Male and female mice (BALB/c strain) treated intraperitoneally once daily with ddC 25 mg/kg for five consecutive days developed mechanical allodynia, assessed using the dynamic plantar aesthesiometer. Treatment with ddC increased microglia markers CD11b and ionized calcium-binding adapter molecule 1 (Iba1) staining intensity in male mice, while only CD11b was increased in female mice. Both sexes had increased phosphorylated p38 MAPK staining intensity. The administration of minocycline, an inhibitor of microglia activation, and adezmapimod, a selective p38 MAPK inhibitor, suppressed mechanical allodynia in both sexes at day 7 after ddC treatment. Therefore, microglia activation and p38 MAPK signaling are important for the development of antiretroviral drug-induced mechanical allodynia.