The function of cortical GABAergic interneurons is largely determined by their integration into specific neural circuits, but the mechanisms controlling the wiring of these cells remain largely unknown. This is particularly true for a major population of basket cells that express the neuropeptide cholecystokinin (CCK). Here we found that the tyrosine kinase receptor ErbB4 was required for the normal integration into cortical circuits of basket cells expressing CCK and vesicular glutamate transporter 3 (VGlut3). The number of inhibitory synapses made by CCK+VGlut3+ basket cells and the inhibitory drive they exerted on pyramidal cells were reduced in conditional mice lacking ErbB4. Developmental disruption of the connectivity of these cells diminished the power of theta oscillations during exploratory behavior, disrupted spatial coding by place cells, and caused selective alterations in spatial learning and memory in adult mice. These results suggest that normal integration of CCK+ basket cells in cortical networks is key to support spatial coding in the hippocampus.