Hippocampal pyramidal cells encode memory engrams, which guide adaptive behavior. Selection of engram-forming cells is regulated by somatostatin-positive dendrite-targeting interneurons, which inhibit pyramidal cells that are not required for memory formation. Here, we found that -aminobutyric acid (GABA)–releasing neurons of the mouse nucleus incertus (NI) selectively inhibit somatostatin-positive interneurons in the hippocampus, both monosynaptically and indirectly through the inhibition of their subcortical excitatory inputs. We demonstrated that NI GABAergic neurons receive monosynaptic inputs from brain areas processing important environmental information, and their hippocampal projections are strongly activated by salient environmental inputs in vivo. Optogenetic manipulations of NI GABAergic neurons can shift hippocampal network state and bidirectionally modify the strength of contextual fear memory formation. Our results indicate that brainstem NI GABAergic cells are essential for controlling contextual memories.