Proteus mirabilis and Staphylococcus aureus are pathogens associated with CAUTIs. Understanding their significance is crucial for effective prevention and treatment. In this study, the Delphinium semibarbatum flavonoid‐rich fraction (DSF) was analyzed, and its antibacterial, antibiofilm, and antiswarming properties against these two bacterial species were evaluated. In the phytochemical analysis, four flavonoids, including kaempferol, 4′‐O‐methyl quercetin, quercetin, and kaempferol‐3‐O‐beta‐D‐glucopyranoside (K3G), were isolated. The minimum inhibitory concentration (MIC50) of DSF on P. mirabilis and S. aureus was 1000 μg/mL. Similarly, kaempferol, K3G, and 4′‐O‐methyl quercetin exhibited inhibitory effects of 20%, 13%, and 12%, respectively, at a concentration of 1000 μg/mL compared to the P. mirabilis control. However, the MIC50 of kaempferol and 4′‐O‐methyl quercetin for S. aureus were 125 μg/mL and 62.25 μg/mL, respectively. K3G exhibited an inhibitory effect of 37% at a concentration of 1000 μg/mL. DSF reduced biofilm at 1 mg/mL by 78% and 74% for P. mirabilis and S. aureus, respectively. Quercetin was the most effective in inhibiting P. mirabilis biofilm formation, with a 96% inhibition rate, followed by kaempferol and K3G, with 67% and 29%, respectively, at the same concentration. The best bioactive compound against biofilm inhibition of S. aureus was quercetin at 250 μg/mL, exhibiting 90% inhibition, followed by K3G, 4′‐O‐methyl quercetin, and kaempferol with 81%, 45%, and 33%, respectively, at a concentration of 125 μg/mL. In the swarming inhibition assay, DSF showed 78% inhibition at concentrations of 5 μg/mL. Similarly, all bioactive compounds showed 45% antiswarming activity at this concentration. The docking results of the isolated flavonoids on two target proteins, SarA and MrpH, showed that the presence of the methoxy group in the structure of 4′‐O‐methyl quercetin reduced its interaction with these two proteins. In the ADMET prediction, isolated flavonoids showed good predicted properties suitable for treating these two microbial species in urinary infection diseases.