Several studies have demonstrated that exposure to arsenic in drinking water adversely affects brain development and cognitive function in adulthood. While the mechanism by which arsenic induces adverse neurological outcomes remains elusive, studies suggest a link between reduced levels of histone acetylation and impaired performance on a variety of behavioral tasks following arsenic exposure. Using our developmental arsenic exposure (DAE) paradigm, we have previously reported reduced histone acetylation and associated histone acetyltransferase enzyme expression in the frontal cortex of C57BL/6J adult male mice, with no changes observed in the female frontal cortex. In the present study, we sought to determine if DAE produced sex-dependent deficits in frontal cortical executive function using the Y-maze acquisition and reversal learning tasks, which are specific for assessing cognitive flexibility. Further, we tested whether the administration of valproic acid, a class I–IIa histone deacetylase inhibitor, was able to mitigate behavioral and biochemical changes resulting from DAE. As anticipated, DAE inhibited acquisition and reversal learning performance in adult male, but not female, mice. Valproate treatment for 2 weeks restored reversal performance in the male arsenic-exposed offspring, while not affecting female performance. Protein levels of HDACs 1, 2, and 5 were elevated following behavioral assessment but only in DAE male mice; restoration of appropriate HDAC levels occurred after valproate treatment and was concurrent with improved behavioral performance, particularly during reversal learning. Female frontal cortical levels of HDAC enzymes were not impacted by DAE or valproate treatment. Finally, mRNA expression levels of brain-derived neurotrophic factor, Bdnf, which has been implicated in the control of frontal cortical flexibility and is regulated by HDAC5, were elevated in DAE male mice and restored to normal levels following HDACi treatment. Levels of mRNA encoding glutamate receptor ionotropic NMDA type subunits, which have been linked to cognitive flexibility, were not related to the reversal learning deficit in the DAE mice and were not altered by HDACi treatments. These findings demonstrate that DAE alters frontal cortical HDAC levels and Bdnf expression in males, but not females, and that these molecular changes are associated with sex-dependent differences in cognitive flexibility in a reversal-learning task.