In contextual fear conditioning animals have to integrate various elemental stimuli into a coherent representation of the condition and then associate context representation with punishment. Although several studies indicated the modulating role of endocannabinoid system (ECS) on the associative learning, ECS effect on contextual fear conditioning requires further investigations. The present study assessed the effects of the increased endocannabinoid anandamide (AEA) tone on acquisition, retrieval and extinction of the contextual fear conditioning. Given that AEA may bind to cannabinoid type 1 (CB1) receptors as well as to postsynaptic ionotropic Transient Receptor Potential Vanilloid type 1 (TRPV1) channels, particular attention was paid in determining how the increased AEA tone influenced fear responses. Furthermore, it was investigated how the ECS modulated the effects of stress-sensitization on fear response. Thus, mice submitted or not to a social defeat stress protocol were treated with drugs acting on ECS, CB1 receptors or TRPV1 channels and tested in a contextual fear conditioning whose conditioning, retrieval and extinction phases were analyzed. ECS activation influenced the extinction process and contrasted the stress effects on fear memory. Furthermore, CB1 receptor antagonist blocked and TRPV1 channel antagonist promoted short- and long-term extinction. The present study indicates that ECS controls the extinction of aversive memories in the contextual fear conditioning.