Striatal medium spiny neurons (MSNs) form inhibitory synapses on neighboring striatal neurons through axon collaterals. The functional relevance of this lateral inhibition and its regulation by dopamine remains elusive. We show that synchronized stimulation of collateral transmission from multiple indirect-pathway MSNs (iMSNs) potently inhibits action potentials in direct-pathway MSNs (dMSNs) in the nucleus accumbens. Dopamine D2 receptors (D2Rs) suppress lateral inhibition from iMSNs to disinhibit dMSNs, which are known to facilitate locomotion. Surprisingly, D2R inhibition of synaptic transmission was larger at axon collaterals from iMSNs than their projections to the ventral pallidum. Targeted deletion of D2Rs from iMSNs impaired cocaine's ability to suppress lateral inhibition and increase locomotion. These impairments were rescued by chemogenetic activation of Gi-signaling in iMSNs. These findings shed light on the functional significance of lateral inhibition between MSNs and offer a novel synaptic mechanism by which dopamine gates locomotion and cocaine exerts its canonical stimulant response.