We report in this study the chemical composition and antibacterial activities of the seed’s essential oils of Pimpinella anisum L. collected from Morocco and Yemen. The hydro-distillation technique was used to extract their essential oils, followed by continuous liquid-liquid fractionation using water and ethyl acetate as solvent system. Obtained essential oils were analyzed by gas chromatography (GC) and gas chromatography-mass spectroscopy (GC-MS). GC and GC/MS results showed that 4-allylanisole was the major compound of Pimpinella anisum L. with percentages of 76.70 and 85.28% of Moroccan and Yemen, respectively, in addition to other minor compounds such as limonene (9.75% for Moroccan species and 5.53% for Yemen species) and fenchone (6.16% for Moroccan species and 4.12% for Yemen species). Furthermore, both essential oils were evaluated for their antibacterial activity against a panel of pathogenic microorganisms. The results showed that both essential oils inhibit most pathogenic bacteria tested.