Shenqi pill (SQP), a famous traditional Chinese medicine (TCM) herbal formula derived from Jinguiyaolue (Synopsis of Prescriptions of the Golden Chamber), has long been used to treat kidney yang deficiency syndrome. According to the TCM treatment principle that the liver and kidney are homologies, the clinical use of SQP in the treatment of nonalcoholic steatohepatitis (NASH) has achieved a good effect. However, the active targeted genes and underlying mechanism remain unclear. In this study, we aimed to explore the treatment mechanism of SQP in NASH rats, which may further contribute to the in-depth exploration of SQP in clinical applications. Network pharmacology analysis was used to screen the target genes of SQP for NASH treatment based on public databases. Gene Ontology (GO), Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analysis, and protein–protein interaction (PPI) analysis were used to search for crucial target genes and mechanisms. UPLC–MS/MS was used to verify the active compounds of the SQP screened. The hepatic pathology and biochemical indicators of rats were used to judge the modeling results and the curative effect of SQP. Western blotting and qRT–PCR were used to verify the expression of crucial target genes at the protein and RNA levels, respectively. Network pharmacology analysis and bioinformatics analysis showed that PTGS2, JUN, MYC, and CDKN1A might be crucial target genes in the primary mechanism of SQP in treating NASH and improving the inflammatory response. The UPLC–MS/MS results confirmed that the hub active compound, quercetin, screened out through the TCMSP database, is indeed present in SQP. Hepatic injury and lipid metabolism indicators of NASH rats were significantly improved after SQP treatment. The results of WB and qRT–PCR showed that the expression of PTGS2, JUN, MYC, and CDKN1A was higher in NASH rats than in normal rats and decreased after SQP treatment. The expression of inflammatory cytokines (IL-1β, IL-6, TNF-α) was reduced after SQP treatment, which confirmed that SQP could improve hepatic inflammation in rats. These results suggested that SQP could ameliorate NASH in rats, and that quercetin may be the critical active compound that exerts the therapeutic effect.