Diabetic retinopathy (DR) is the most prevalent microvascular complication of diabetes mellitus, and it is the primary cause of blindness in the working-age population worldwide. Nevertheless, the pathogenic molecular mechanisms of DR remain elusive. Hub genes were identified through bioinformatics analysis in the GSE102485 and GSE60436 datasets. The DR mouse model was induced using streptozotocin (STZ, 150 mg/kg), and pathological changes in retinal tissue were assessed via HE staining. Apoptosis in retinal tissue cells was evaluated by the TUNEL assay. RT-qPCR and ELISA assays were employed to measure hub genes and inflammatory factor levels, respectively. The aryl hydrocarbon receptor (AHR)/interleukin (IL)-17A (AHR/IL-17A) pathway-associated proteins were detected by western blot. In the high glucose (HG)-induced ARPE-19 cells, CCK-8 and flow cytometry were used to perform cell function studies. Six hub genes associated with DR were screened. The expression levels of RHO, PRPH2, CRX, RCVRN, and NR2E3 were reduced, while the COL1A2 was elevated. NR2E3 overexpression reduced inflammatory factor (TNF-α, IL-1β, and IL-6) and cell apoptosis levels in DR. Furthermore, NR2E3 overexpression promoted HG-induced ARPE-19 cell proliferation. Mechanistically, NR2E3 overexpression facilitated the protein expression of AHR, while suppressing the IL-17 and ACT1 expressions. The introduction of Kyn-101, an AHR inhibitor, notably reversed the inhibitory effects of NR2E3 overexpression on inflammation and apoptosis, which were validated both in vivo and in vitro. NR2E3 inhibits the inflammation and apoptosis by regulating the AHR/IL-17A pathway, providing new insights into the DR treatment.