Cyclodextrins and their derivatives have shown successful applications in extracting active compounds from medicinal plants. However, the use of β‐cyclodextrin derivatives for extracting apigenin and luteolin from Chrysanthemum indicum L. remains unexplored. Additionally, the application of nature‐inspired optimization algorithms in optimizing extraction conditions has been limited. Therefore, this study was performed with the aims of optimizing the extraction of apigenin and luteolin from C. indicum with the assistance of 2‐hydroxypropyl‐β‐cyclodextrin (HP‐β‐CD) using response surface methodology combined with various optimization algorithms, including desirability function approach, genetic algorithm, particle swarm optimization, and firefly algorithm. The results showed that the optimal conditions obtained by the four algorithms were consistent, with an extraction time of 60 min, HP‐β‐CD concentration of 30 mg/mL, and a solvent‐to‐solid ratio of 24 mg/mL. At these conditions, the apigenin and luteolin contents were 1.362±0.008 and 8.724±0.117 mg/g, respectively. The results also showed that HP‐β‐CD‐assisted extraction exhibited significantly higher apigenin and luteolin contents compared to conventional solvent. Comparable results were also yielded from the antioxidant assay. Our study suggested that the nature‐inspired optimization algorithms might be potential options in enhancing the effectiveness of the traditional response surface methodology for the optimization of extraction of natural products.