The genetic basis of cognition and behavioral adaptation to the environment remains poorly understood. Here we demonstrate that the histone methyltransferase complex GLP/G9a controls cognition and adaptive responses in a region-specific fashion in the adult brain. Using conditional mutagenesis in mice, we show that postnatal, neuron-specific deficiency of GLP/G9a leads to derepression of numerous nonneuronal and neuron progenitor genes in adult neurons. This transcriptional alteration is associated with complex behavioral abnormalities, including defects in learning, motivation, and environmental adaptation. The behavioral changes triggered by GLP/G9a deficiency are similar to key symptoms of the human 9q34 mental retardation syndrome that is associated with structural alterations of the GLP/EHMT1 gene. The likely causal role of GLP/G9a in mental retardation in mice and humans suggests a key role for the GLP/G9a-controlled histone H3K9 dimethylation in regulation of brain function through maintenance of the transcriptional homeostasis in adult neurons.