Bioinformatics analysis helps to understand the underlying mechanisms and adjust diagnostic and treatment strategies for immunoglobulin A nephropathy (IgAN) by screening gene expression datasets. We explored the biological function of IgAN, and established and validated a diagnostic model for IgAN using weighted gene co-expression network analysis. Using the GSE93798 and GSE37460 datasets, we performed differential expression analysis, Gene Oncology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analysis, constructed a protein-protein network, and identified hub genes. A diagnostic model was built using a receiver operating characteristic curve, calibration plot, and decision curve analysis. Two Gene Expression Omnibus (GEO) datasets were integrated to screen 38 differentially expressed genes between patients with IgAN and normal kidney donors in glomerular samples. KEGG enrichment analysis showed that the differentially expressed genes were mainly enriched in the IL-17 and relaxin signaling pathways. We constructed a protein-protein interaction (PPI) network of differentially expressed genes using the STRING database and cross-compared it with the results of weighted gene correlation network analysis to screen out the top 10 key genes: FOS, EGR2, FOSB, NR4A1, BR4A3, FOSL1, NR4A2, ALB, CD53, C3AR1.We also found that the immune infiltration level was remarkably increased in IgAN tissues. We established a 5-gene panel diagnostic model (ACTA2, ALB, AFM, ALDH1L1, and ALDH6A1). The combined diagnostic ability was high, with the area under the curve (AUC) was 0.964. Based on these 5 genes, we also developed a risk-scoring evaluation system for individuals. The calibration plot indicated that the nomogram-predicted probability of nonadherence was highly correlated with actual diagnosed nonadherence, and the decision curve analysis indicated that patients had a relatively good net benefit. The model and gene expression were also validated using an external dataset. Our study provides directions for exploring the potential molecular mechanisms of IgAN as well as diagnostic and therapeutic strategies.