Autism spectrum disorder (ASD) is a neurodevelopmental disorder characterized by asynchronous development in several areas such as social behaviors, cognitive capabilities, and sensory responsiveness. Among the sensory abnormalities recognized as important features of ASD is either heightened or reduced sensitivity to pain. Individuals with ASD may experience pain in unusual ways, but mechanisms underlying altered pain sensitivity and processing in ASD remain unknown. Here we investigated the pain sensitivity in a prenatal valproic acid (VPA)-induced model of ASD and subsequently analyzed the pain signaling. Pregnant ICR mice were intraperitoneally injected with either VPA or saline on embryonic day 12.5. Male offspring of VPA-treated mothers showed mechanical allodynia. In the dorsal horn of the spinal cord in prenatal VPA-treated mice, the numbers and staining intensities of Iba1-positive cells were increased and the cell bodies became enlarged, indicating the microglial activation. Administration of PLX3397, a colony-stimulating factor 1 receptor inhibitor, resulted in a decreased number of spinal microglia and attenuated mechanical allodynia in prenatal VPA-treated mice. These findings suggest that prenatal VPA treatment causes allodynia and microglial activation might in part contribute to increased nociceptive responses.