Diabetic nephropathy (DN) is the most prevalent microvascular consequence of diabetes and has recently risen to the position of the world’s second biggest cause of end-stage renal diseases. Growing studies suggest that oxidative stress (OS) responses are connected to the advancement of DN. This study aimed to developed a novel diagnostic model based on OS-related genes. The differentially expressed oxidative stress-related genes (DE-OSRGs) experiments required two human gene expression datasets, which were given by the GEO database (GSE30528 and GSE96804, respectively). The potential diagnostic genes were identified using the SVM-RFE assays and the LASSO regression model. CIBERSORT was used to determine the compositional patterns of the 22 different kinds of immune cell fraction seen in DN. These estimates were based on the combined cohorts. DN serum samples and normal samples were both subjected to RT-PCR in order to investigate the degree to which certain genes were expressed. In this study, we were able to locate 774 DE-OSRGs in DN. The three marker genes (DUSP1, PRDX6 and S100A8) were discovered via machine learning on two different machines. The high diagnostic value was validated by ROC tests, which focused on distinguishing DN samples from normal samples. The results of the CIBERSORT study suggested that DUSP1, PRDX6, and S100A8 may be associated to the alterations that occur in the immunological microenvironment of DN patients. Besides, the results of RT-PCR indicated that the expression of DUSP1, PRDX6, and S100A8 was much lower in DN serum samples compared normal serum samples. The diagnostic value of the proposed model was likewise verified in our cohort, with an area under the curve of 9.946. Overall, DUSP1, PRDX6, and S100A8 were identified to be the three diagnostic characteristic genes of DN. It’s possible that combining these genes will be effective in diagnosing DN and determining the extent of immune cell infiltration.