Autism spectrum disorder (ASD) is a developmental condition whose primary features include social communication and interaction impairments with restricted or repetitive motor movements. No approved treatment for the core symptoms is available and considerable research efforts aim at identifying effective therapeutic strategies. Emerging evidence suggests that altered endocannabinoid signaling and immune dysfunction might contribute to ASD pathogenesis. In this scenario, phytocannabinoids could hold great pharmacological potential due to their combined capacities to act either directly or indirectly on components of the endocannabinoid system and to modulate immune functions. Among all plant-cannabinoids, the phytocannabinoid cannabidivarin (CBDV) was recently shown to reduce motor impairments and cognitive deficits in animal models of Rett syndrome, a condition showing some degree of overlap with autism, raising the possibility that CBDV might have therapeutic potential in ASD. Here, we investigated the ability of CBDV treatment to reverse or prevent ASD-like behaviors in male rats prenatally exposed to valproic acid (VPA; 500 mg/kg i.p.; gestation day 12.5). The offspring received CBDV according to two different protocols: symptomatic (0.2/2/20/100 mg/kg i.p.; postnatal days 34-58) and preventative (2/20 mg/kg i.p.; postnatal days 19-32). The major efficacy of CBDV was observed at the dose of 20 mg/kg for both treatment schedules. CBDV in symptomatic rats recovered social impairments, social novelty preference, short-term memory deficits, repetitive behaviors and hyperlocomotion whereas preventative treatment reduced sociability and social novelty deficits, short-term memory impairments and hyperlocomotion, without affecting stereotypies. As dysregulations in the endocannabinoid system and neuroinflammatory markers contribute to the development of some ASD phenotypes in the VPA model, neurochemical studies were performed after symptomatic treatment to investigate possible CBDV’s effects on the endocannabinoid system, inflammatory markers and microglia activation in the hippocampus and prefrontal cortex. Prenatal VPA exposure increased CB1 receptor, FAAH and MAGL levels, enhanced GFAP, CD11b, and TNFα levels and triggered microglia activation restricted to the hippocampus. All these alterations were restored after CBDV treatment. These data provide preclinical evidence in support of the ability of CBDV to ameliorate behavioral abnormalities resembling core and associated symptoms of ASD. At the neurochemical level, symptomatic CBDV restores hippocampal endocannabinoid signaling and neuroinflammation induced by prenatal VPA exposure.