Sweet basil (Ocimum basilicum)leaves are rich in bioactive compounds that present therapeutic benefits for human health. Ultrasonic-assisted extraction (UAE) is frequently used to obtain phenolic compounds from plants/herbal sources. However, few works have developed multi-variable studies to find the optimal conditions to extract the maximum amount of compounds, especially when applied to UAE via a sonotrode. The purpose of this work was to perform a multi-variable study by employing a Box–Behnken design to collect the highest active compound content fromOcimum basilicumleaves. The efficacy of the design was endorsed by ANOVA. The studied parameters for UAE via a sonotrode were the ethanol/water ratio, amplitude, and time. The analyzed responses were the rosmarinic acid, the sum of phenolic acids, and the sum of phenolic compounds content. The optimal conditions were found to be 50% ethanol/water, 50% amplitude, and 5 min. Twenty bioactive compounds were identified by HPLC-ESI-TOF-MS when the extract was collected by applying the optimal conditions.Ocimum basilicummay be appreciated as a valuable source of important bioactive substances for pharmaceutical use.