The structures of 2-aryl-5-nitro-1H-indole derivatives were optimized with PM3 and DFT at b3lyp/6–31 g* level successively. Some structural and electric descriptors were obtained from the single point energy calculation and natural bond orbital analysis at the level of b3lyp/6–31 g*. As efflux pump inhibitors, a QSAR model was built with genetic algrithum (GA) and partial least square (PLS) analyses. The high R 2 and $$R_{{\text{CV}}}^{\text{2}} $$ indicates the derived model has a good predictive power which can be used in prediction of activity for new 2-aryl-5-nitro-1H-indole derivatives. This model gives us a revelation that the activity of 2-aryl-5-nitro-1H-indole derivatives as efflux pump inhibitor can be improved by properly increasing the molecular volume and Mulliken atomic charge of C3 (Q C3) or lowering the dipole and Mulliken atomic charge of C4 (Q C4) in 2-aryl and it was found from this article that a QSAR relationship can be built for small samples with large descriptors by compressing the descriptors with GA and analyzing with PLS. With this model, a new compound, 2-(2-Azidomethyl-5-phenoxy-phenyl)-5-nitro-1H-indole was predicted to lower the MIC of berberine to 0.091 μg/mL for inhibiting K2361 of S. aureus with NorA efflux pump protein over expression. Figure: Basic structure of 2-aryl-5-nitro-1H-indoles