Brain-derived neurotrophic factor (BDNF) and other neurotrophins have a vital role in the development of the rat and mouse nervous system by influencing the expression of many specific genes that promote differentiation, cell survival, synapse formation and, later, synaptic plasticity. Although nitric oxide (NO) is known to be an important mediator of BDNF signalling in neurons, the mechanisms by which neurotrophins influence gene expression during development and plasticity remain largely unknown. Here we show that BDNF triggers NO synthesis and S-nitrosylation of histone deacetylase 2 (HDAC2) in neurons, resulting in changes to histone modifications and gene activation. S-nitrosylation of HDAC2 occurs at Cys 262 and Cys 274 and does not affect deacetylase activity. In contrast, nitrosylation of HDAC2 induces its release from chromatin, which increases acetylation of histones surrounding neurotrophin-dependent gene promoters and promotes transcription. Notably, nitrosylation of HDAC2 in embryonic cortical neurons regulates dendritic growth and branching, possibly by the activation of CREB (cyclic-AMP-responsive-element-binding protein)-dependent genes. Thus, by stimulating NO production and S-nitrosylation of HDAC2, neurotrophic factors promote chromatin remodelling and the activation of genes that are associated with neuronal development.