Background: The use of Ammi majus L. for the treatment of various diseases has been reported by many. Its umbelliferous fruits possess khellin that is responsible for various pharmacological activities and used in treating psoriasis and vitiligo. Objectives: The study objective was to analyze the optimization of extraction parameters of khellin from A. majus L. by response surface methodology (RSM). Materials and Methods: Box–Behnken Design (BBD) of RSM was used for optimization needs. Quantification of khellin in extracts was done by high performance thin-layer chromatography using a mix of ethyl acetate: toluene: formic acid, and the peaks were monitored at 254 nm. Results: Among the explored traditional modes and ultrasound-assisted extraction (UAE), UAE was found to be the most ideal for khellin extraction, with methanol being the most suitable solvent. The applied BBD established a quadratic model for the experimental setup with the regression coefficient of 0.998. The optimal conditions were set up as – extraction temperature: 63.84°C, extraction time: 29.51 min. and solvent-to-drug ratio: 21.64 v/w, which yielded 6.21% w/w of khellin. Contrarily, under the modified experimental conditions, 6.86% w/w of khellin was extracted. Conclusion: It was concluded that all the variables studied significantly affected khellin yield. Moreover, a contemporary green extraction mode stood out to be the best for khellin extraction.