Objective: The aim of the current study is to determine the chemical composition and evaluate antibacterial activity of Vitex agnus-castus L. (VAC) essential oils against some bacteria causing nosocomial infections in the neonatal and intensive care rooms at the university hospital center of Fez Morocco. Methods: The phytochemical screening of essential oils was determined using gas chromatography (GC) and GC-mass spectrometry analysis. The antibacterial test was evaluated against Gram-positive bacteria Staphylococcus aureus and Gram-negative bacteria species (Escherichia coli, Klebsiella pneumoniae, Pseudomonas aeruginosa, and Proteus mirabilis) using disc diffusion method. Results: Twenty-nine components were identified in the fruits’ oil representing 93.1% of total oil. The major components in the fruits oil are 1,8-cineole (11.6%), α-thujene (9.3%), phyllocladene (8.2%), α-pinene (7.9%), caryophyllene (5.9%), and cubenol (5%). Furthermore, 28 components were identified in the leaf essential oil. The main component was caryophyllene (9.5%), followed by 1,8-cineole (8.7%), manoyl oxide (7.3%), eugenyl acetate (7.1%), phyllocladene (6.8%), and α-pinene (5.2%). Antibacterial activity of both oils showed a strong activity against nosocomial bacteria tested. Conclusion: Essential oils of Moroccan VAC could be exploited as natural drugs for bacteria, especially those who have acquired resistance to conventional antibiotics.