Sex differences have been identified in relation to many neural characteristics and behaviors. Most sex differences arise following exposure to testosterone, but relatively little is known about the molecular mechanisms of steroid hormone action. In many cases, perinatal hormone exposure determines life-long sex specific changes, suggesting a cellular memory for the testosterone exposure. Testosterone-induced changes in chromatin structure could lead to long-term changes in gene expression and account for this memory. We previously showed that treatment of neonatal mice with the histone deacetylase inhibitor, valproic acid, blocked sexual differentiation of cell number in the bed nucleus of the stria terminalis (BNST). In the present study, we tested the hypothesis that VPA blocked masculinization by altering developmental cell death. To do this, we administered VPA during the critical period for hormone action and determined the number of dying cells during the first week of life using activated caspase-3 immunohistochemistry and TUNEL staining. Females had more dying cells on postnatal days 5 and 6 than males and testosterone treatment decreased the density of TUNEL-positive cells to the level of control males. As expected, VPA treatment had no effect on the number of dying cells in males or control females. VPA did, however, prevent the cell survival associated with testosterone treatment in females. This partially supports the prediction that VPA blocked masculinization of the BNST by altering sexually dimorphic cell death.