Ayahuasca (AYA) is a botanical psychedelic with promising results in observational and small clinical trials for depression, trauma and drug use disorders. Its psychoactive effects primarily stem from N,N-dimethyltryptamine (DMT). However, there is a lack of research on how and where AYA acts in the brain. This study addressed these questions by examining the extinction of aversive memories in AYA-treated rats. We focused on the 5-HT1A and 5-HT2A receptors, as DMT exhibits a high affinity for both of them, along with the infralimbic cortex in which activity and plasticity play crucial roles in regulating the mnemonic process under analysis. A single oral treatment with AYA containing 0.3 mg·kg-1 of DMT increased the within-session extinction of contextual freezing behaviour without affecting its recall. This protocol, when repeated twice on consecutive days, enhanced extinction recall. These effects were consistent for both 1- and 21-day-old memories in males and females. AYA effects on fear extinction were independent of changes in anxiety and general exploratory activity: AYA- and vehicle-treated animals showed no differences when tested in the elevated plus-maze. The 5-HT2A receptor antagonist MDL-11,939 and the 5-HT1A receptor antagonist WAY-100635 infused into the infralimbic cortex respectively blocked within- and between-session fear extinction effects resulting from repeated oral administration of AYA. Our findings highlight complementary mechanisms by which AYA facilitates the behavioural suppression of aversive memories in the rat infralimbic cortex. These results suggest potential beneficial effects of AYA or DMT in stress-related disorders.