Mental disorders are psychological symptoms that impact multiple areas of an individual’s life. Depression and anxiety are chronic illnesses described as the most prevalent stress-related mood disorders that cause injury and early death. In Morocco, Anise “Pimpinella anisum L.” is one of the most traditionally used condiment plants, which has long been used to cure various illnesses and in phytotherapy. The present study was designed to investigate the antidepressant, anxiolytic, and memory impact of the total extract of Pimpinella anisum (PATE) at the doses of 100 and 200 mg/kg, using the Forced Swimming Test (FST), Tail Suspension Test (TST), Open Field Test (OFT), and Light–Dark Box Test (LDBT) as an experimental paradigm of anxiety and depression, and Novel Object Recognition Test (NORT) and the Morris Water Maze Test (MWMT) as memory tests on Swiss albino mice. The tests were carried out on the 1st, 7th, 14th, and the 21st days of the study, and the extract groups were compared with normal controls and positive controls (receiving bromazepam and paroxetine at the doses of 1 mg/kg and 11.5 mg/kg for anxiety and depression, respectively). The daily oral gavage of the mice by the PATE induced a significant anxiolytic and antidepressant-like effect by shortening immobility time and decreasing downtime in the different tests. PATE at both doses was shown to have no impact on memory following the NORT and MWM tests. Different compounds, such as gallic acid, catechin, chlorogenic acid, caffeic acid, oleuropein, p-coumaric acid, trans-4-hydroxy-3-methoxycinnamic acid, myricetin, and quercetin, were identified during the phytochemical analysis carried out using HPLC analysis. This research supports and promotes the extract’s traditional use, suggesting its use as a phytomedicine against depression and anxiety, and calls for further research to clarify its mode of action.