Single-factor experiment and Box-Behnken design were applied to optimize the infrared-assisted extraction (IRAE) of rutin, quercetin, kaempferol, and isorhamnetin from Flos sophorae. Four factors (extract solvent, solid-liquid ration, extraction time, infrared power) affecting the extraction yield of flavonoids were studied. Under optimized conditions the extraction yield was 33.199 ± 0.24 mg/g, which substantially improved, compared with heating reflux extraction (HRE) and ultrasonic-assisted extraction (UAE), while extraction time was only 9 min. The eluents were rich in 2,2-diphenyl-1-picrylhydrazyl (DPPH) and 2,2′-azobis (2-methyl-propionamidine) dihydrochloride radical scavenging potential (IC50 of DPPH: 53.44 ± 0.01 μg/mL, oxygen radical absorbance capacity (ORAC): 3785.83 ± 52 μmol/g) than the extracts obtained by HRE and UAE. In addition, an ultra-high performance liquid chromatography method was optimized for the identification and quantification of the tested flavonoids, and the method was validated based on its correlation coefficient (r), reproducibility (RSD, n = 5), and recovery values, which were 0.9994–0.9998, 0.74–1.83%, and 97.78–102.94%, respectively. These results confirmed that high extraction yield of flavonoids results in stronger antioxidant values and response surface methodology optimization of IRAE is a promising alternative to traditional extraction techniques for flavonoids from medicinal plants.