Interactions between dopamine and glutamate signalling within the nucleus accumbens core are required for behavioural reinforcement and habit formation. Dopamine modulates excitatory glutamatergic signals from the prefrontal cortex, but the precise mechanism has not been identified. We combined optical and electrophysiology recordings in murine slice preparations from CB1 receptor-null mice and green fluorescent protein hemizygotic bacterial artificial chromosome transgenic mice to show how dopamine regulates glutamatergic synapses specific to the striatonigral and striatopallidal basal ganglia pathways. At low cortical frequencies, dopamine D1 receptors promote glutamate release to both D1 and D2 receptor-expressing medium spiny neurons while D2 receptors specifically inhibit excitatory inputs to D2 receptor-expressing cells by decreasing exocytosis from cortical terminals with a low probability of release. At higher cortical stimulation frequencies, this dopaminergic modulation of presynaptic activity is occluded by adenosine and endocannabinoids. Glutamatergic inputs to both D1 and D2 receptor-bearing medium spiny neurons are inhibited by adenosine, released upon activation of NMDA and AMPA receptors and adenylyl cyclase in D1 receptor-expressing cells. Excitatory inputs to D2 receptor-expressing cells are specifically inhibited by endocannabinoids, whose release is dependent on D2 and group 1 metabotropic glutamate receptors. The convergence of excitatory and inhibitory modulation of corticoaccumbal activity by dopamine, adenosine and endocannabinoids creates subsets of corticoaccumbal inputs, selectively and temporally reinforces strong cortical signals through the striatonigral pathway while inhibiting the weak, and may provide a mechanism whereby continued attention might be focused on behaviourally salient information.