The influence of motor activity on sensory processing is crucial for perception and motor execution. However, the underlying circuits are not known. To unravel the circuit by which activity in the primary vibrissal motor cortex (vM1) modulates sensory processing in the primary somatosensory barrel cortex (S1), we used optogenetics to examine the long-range inputs from vM1 to the various neuronal elements in S1. We found that S1-projecting vM1 pyramidal neurons strongly recruited vasointestinal peptide (VIP)-expressing GABAergic interneurons, a subset of serotonin receptor-expressing interneurons. These VIP interneurons preferentially inhibited somatostatin-expressing interneurons, neurons that target the distal dendrites of pyramidal cells. Consistent with this vM1-mediated disinhibitory circuit, the activity of VIP interneurons in vivo increased and that of somatostatin interneurons decreased during whisking. These changes in firing rates during whisking depended on vM1 activity. Our results suggest previously unknown circuitry by which inputs from motor cortex influence sensory processing in sensory cortex.