The hippocampus is a brain region that is essential for the initial encoding of episodic memories. However, the consolidation of these memories is thought to occur in the neocortex, under guidance of the hippocampus, over the course of days and weeks. Communication between the hippocampus and the neocortex during hippocampal sharp wave-ripple oscillations is believed to be critical for this memory consolidation process. Yet, the synaptic and circuit basis of this communication between brain areas is largely unclear. To address this problem, we perform in vivo whole-cell patch-clamp recordings in the frontal neocortex and local field potential recordings in CA1 of head-fixed mice exposed to a virtual-reality environment. In mice trained in a goal-directed spatial task, we observe a depolarization in frontal principal neurons during hippocampal ripple oscillations. Both this ripple-associated depolarization and goal-directed task performance can be disrupted by chemogenetic inactivation of somatostatin-positive (SOM+) interneurons. In untrained mice, a ripple-associated depolarization is not observed, but it emerges when frontal parvalbumin-positive (PV+) interneurons are inactivated. These results support a model where SOM+ interneurons inhibit PV+ interneurons during hippocampal activity, thereby acting as a disinhibitory gate for hippocampal inputs to neocortical principal neurons during learning.