<p class="Mabstract"><span lang="EN-US">The computational study was carried out to understand the anti-corrosion properties of Croweacin, a major chemical component of two essential oils of <em>Ammi visnaga</em> (L.) Lam collected from northern Morocco in 2016 (EO16) and 2018 (EO18) against brass corrosion in a 3% NaCl medium. The study, moreover, considers the inhibitory effect of some minor compounds of EO18 such as Eugenol, Trans-Anethole, α-Isophorone, and Thymol. In this context, the quantum mechanics modelling using the density functional theory (DFT) method with B3LYP /6-31G (d, p) were conducted in the aqueous medium by the use of the IEFPCM model and SCRF theory. The DFT method was adopted to identify, analyze and interpret several elements such as the electronic features, the Frontier Molecular Orbitals (FMO) diagram, Molecular Electrostatic Potential (MEP), contours maps of the electrostatic potential (ESP), and the Mulliken population analysis. The DFT demonstrated that the studied compounds are excellent corrosion inhibitors.</span></p><p class="Mabstract"><span lang="EN-US">Furthermore, the Monte Carlo (MC) type simulation of molecular dynamics (MD) was carried out to provide information on the adsorption mechanism of the studied inhibitors through the active sites on the metal surface. This method informed us that the studied inhibitors have high adsorption energy when interacting with the metal surface, especially for Croweacin (-68.63 kcal/mol). The results obtained from DFT and the MC type simulations are in good agreement.</span></p>