The essential oil extracted from Borago officinalis L. aerial parts using hydrodistillation contains several compounds, although it yields low amounts. For the first time, this study investigated the effects of hydrodistillation parameters and optimized conditions to maximize the yield of B. officinalis essential oil while characterizing its chemical composition using gas chromatography‐mass spectrometry. A single‐factor evaluation of three extraction parameters—extraction time, liquid‐to‐solid ratio, and soaking time—revealed optimal conditions of 4 h, 10:1 mL/g, and 2 h, respectively. Subsequently, the Box‐Behnken response surface method produced a significant polynomial model, determining optimal conditions of an extraction time of 5 h, a liquid‐to‐solid ratio of 11.06:1 mL/g, and a soaking time of 2 h, 17 min, and 34 s, resulting in an essential oil yield of 0.42%. 21 compounds were identified in B. officinalis essential oil, predominantly nonacosane (29.15%) and phytol (27.92%).