A green and efficient ultrasound-assisted extraction (UAE) method using deep eutectic solvents (DESs) was developed to acquire flavonoids from Rudbeckia hirta L. flowers. Among 14 DESs synthesized from choline chloride and different hydrogen bond donors, choline chloride:ethylene glycol (1:2) was identified as the best for flavonoid extraction. Response surface methodology, adopted for parameter optimization of the DES-UAE method, revealed that the maximal total flavonoid content (TFC), at 37.41 ± 1.32 mg rutin equivalents/g dry mass, was extracted at 50 °C, a DES water content of 16 %, and 85 W ultrasonic power. DES-UAE increased the TFC and the antioxidant capacity of the extract while reducing the time, temperature, and ultrasonic power required for extraction when compared with conventional extraction techniques. HPLC analysis revealed that the replacement of DES for ethanol in UAE increased the contents of individual flavonoids of interest (quercetagitrin, patulitrin, patuletin, and quercetin) in the extracts in a range from 9.4 % to 24.4 %. The anti-inflammatory activity of the extract, assessed using a lipopolysaccharide-induced macrophage inflammation model, was substantially higher after using DES-UAE than after using traditional methods. The flavonoids present in the extract may be responsible for most of the anti-inflammatory activity of the R. hirta extract. In summary, DES-UAE is a sustainable and high-performance extraction procedure for the extraction of natural flavonoids from plants. Moreover, R. hirta can be regarded as a good resource for the isolation of natural anti-inflammatory agents and flavonoids.