It has been proposed that memories are encoded by modification of synaptic strengths through cellular mechanisms such as long-term potentiation (LTP) and long-term depression (LTD)1. However, the causal link between these synaptic processes and memory has been difficult to demonstrate2. Here we show that fear conditioning3,4,5,6,7,8, a type of associative memory, can be inactivated and reactivated by LTD and LTP, respectively. We began by conditioning an animal to associate a foot shock with optogenetic stimulation of auditory inputs targeting the amygdala, a brain region known to be essential for fear conditioning3,4,5,6,7,8. Subsequent optogenetic delivery of LTD conditioning to the auditory input inactivates memory of the shock. Then subsequent optogenetic delivery of LTP conditioning to the auditory input reactivates memory of the shock. Thus, we have engineered inactivation and reactivation of a memory using LTD and LTP, supporting a causal link between these synaptic processes and memory.