To encode specific sensory inputs, cortical neurons must generate selective responses for distinct stimulus features. In principle, a variety of factors can contribute to the response selectivity of a cortical neuron: the tuning and strength of excitatory1,2,3 and inhibitory synaptic inputs4,5,6, dendritic nonlinearities7,8,9 and spike threshold10,11. Here we use a combination of techniques including in vivo whole-cell recording, synaptic- and cellular-resolution in vivo two-photon calcium imaging, and GABA (γ-aminobutyric acid) neuron-selective optogenetic manipulation to dissect the factors that contribute to the direction-selective responses of layer 2/3 neurons in ferret visual cortex (V1). Two-photon calcium imaging of dendritic spines12,13 revealed that each neuron receives a mixture of excitatory synaptic inputs selective for the somatic preferred or null direction of motion. The relative number of preferred- and null-tuned excitatory inputs predicted a neuron’s somatic direction preference, but failed to account for the degree of direction selectivity. By contrast, in vivo whole-cell patch-clamp recordings revealed a notable degree of direction selectivity in subthreshold responses that was significantly correlated with spiking direction selectivity. Subthreshold direction selectivity was predicted by the magnitude and variance of the response to the null direction of motion, and several lines of evidence, including conductance measurements, demonstrate that differential tuning of excitation and inhibition suppresses responses to the null direction of motion. Consistent with this idea, optogenetic inactivation of GABAergic neurons in layer 2/3 reduced direction selectivity by enhancing responses to the null direction. Furthermore, by optogenetically mapping connections of inhibitory neurons in layer 2/3 in vivo, we find that layer 2/3 inhibitory neurons make long-range, intercolumnar projections to excitatory neurons that prefer the opposite direction of motion. We conclude that intracortical inhibition exerts a major influence on the degree of direction selectivity in layer 2/3 of ferret V1 by suppressing responses to the null direction of motion.