Mammals, including rodents show a broad range of defensive behaviors as a mean of coping with threatful stimuli including freezing and avoidance behaviors. Several studies emphasized the role of the dorsal medial prefrontal cortex (dmPFC) in encoding the acquisition as well as the expression of freezing behavior. However the role of this structure in processing avoidance behavior and the contribution of distinct prefrontal circuits to both freezing and avoidance responses are largely unknown. To further investigate the role of dmPFC circuits in encoding passive and active fear-coping strategies, we developed in the laboratory a novel behavioral paradigm in which a mouse has the possibility to choose either to passively freeze to an aversive stimulus or to actively avoid it as a function of contextual contingencies. Using this behavioral paradigm we investigated whether the same circuits mediate freezing and avoidance behaviors or if distinct neuronal circuits are involved. To address this question, we used a combination of behavioral, neuronal tracing, immunochemistry, single unit and patch clamp recordings and optogenetic approaches. Our results indicate that (i) dmPFC and dorsolateral and lateral periaqueductal grey (dl/lPAG) sub-regions are activated during avoidance behavior, (ii) a subpopulation of dmPFC neurons encode avoidance but not freezing behavior, (iii) this neuronal population project to the dl/lPAG, (iv) the optogenetic activation or inhibition of this pathway promoted and blocked the acquisition of conditioned avoidance and (v) avoidance learning was associated with the development of plasticity at dmPFC to dl/lPAG synapses. Together, these data demonstrate for the first time that activity-dependent plasticity in a subpopulation of dmPFC cells projecting to the dl/lPAG pathway controls avoidance learning.