Addiction is proposed to arise from alterations in synaptic strength via mechanisms of long-term potentiation (LTP) and depression (LTD). However, the causality between these synaptic processes and addictive behaviors is difficult to demonstrate. Here we report that LTP and LTD induction altered operant alcohol self-administration, a motivated drug-seeking behavior. We first induced LTP by pairing presynaptic glutamatergic stimulation with optogenetic postsynaptic depolarization in the dorsomedial striatum, a brain region known to control goal-directed behavior. Blockade of this LTP by NMDA-receptor inhibition unmasked an endocannabinoid-dependent LTD. In vivo application of the LTP-inducing protocol caused a long-lasting increase in alcohol-seeking behavior, while the LTD protocol decreased this behavior. We further identified that optogenetic LTP and LTD induction at cortical inputs onto striatal dopamine D1 receptor-expressing neurons controlled these behavioral changes. Our results demonstrate a causal link between synaptic plasticity and alcohol-seeking behavior and suggest that modulation of this plasticity may inspire a therapeutic strategy for addiction.