This work aimed to explore the key targets and intervention mechanisms of Huangqi (Astragalus membranaceus) in diabetic nephropathy using weighted gene co-expression network analysis (WGCNA). The findings will provide references for identifying critical therapeutic targets for diabetic nephropathy. The GSE1009 dataset was selected from the Gene Expression Omnibus (GEO) database of the National Center for Biotechnology Information (NCBI) for analysis. WGCNA network was constructed to identify differentially expressed genes (DEGs). Gene ontology (GO) and pathway enrichment analysis were performed on the DEGs. There were 752 downregulated DEGs and 1,547 upregulated DEGs in the diabetic nephropathy samples. Genes such as PLCE1, CLIC5, PTPRO, HSPA12A, AIF1, GMDS, and SEMA5A were significantly suppressed in the diabetic nephropathy samples, while genes such as CEP152, LUNAR1, and SLC9A1 were significantly upregulated. The optimal soft threshold for the WGCNA network was determined as 12. Hierarchical clustering analysis was conducted to detect co-expression modules with corresponding color assignments, and a total of 9 modules were identified. Clinical characteristics showed a high correlation with the gray, blue, green, and brown modules of the WGCNA. GO analysis and KEGG pathway enrichment analysis revealed that the blue module DEGs were mainly enriched in immune response, inflammatory response, signal transduction, plasma membrane, extracellular region, cell surface, extracellular matrix, and proteinaceous extracellular matrix. The green module DEGs were mainly enriched in mitochondrial elongation, mitochondrial mutation termination, translation, mitochondrial inner membrane, mitochondrion, ATP biosynthetic process, mitochondrial large ribosomal subunit, mitochondrial intermembrane space, nucleolus, and ribosome. Visualization analysis of the bioactive components of Huangqi showed compounds such as quercetin, resveratrol, 7-O-methylisomucronulatol, and isoquercetin, which had more targets. Differentially expressed genes in diabetic nephropathy were mainly enriched in immune response and inflammatory response. Various components of Huangqi have positive application value in the treatment of diabetic nephropathy and can be considered for clinical promotion.