Background. Diabetic keratopathy (DK) poses a significant challenge in diabetes mellitus, yet its molecular pathways and effective treatments remain elusive. The aim of our research was to explore the pyroptosis-related genes in the corneal epithelium of the streptozocin-induced diabetic rats. Methods. After sixteen weeks of streptozocin intraperitoneal injection, corneal epithelium from three diabetic rats and three normal groups underwent whole-transcriptome sequencing. An integrated bioinformatics pipeline, including differentially expressed gene (DEG) identification, enrichment analysis, protein-protein interaction (PPI) network, coexpression, drug prediction, and immune deconvolution analyses, identified hub genes and key drivers in DK pathogenesis. These hub genes were subsequently validated in vivo through RT-qPCR. Results. A total of 459 DEGs were screened out from the diabetic group and nondiabetic controls. Gene Set Enrichment Analysis highlighted significant enrichment of the NOD-like receptor, Toll-like receptor, and NF-kappa B signaling pathways. Intersection of DEGs and pyroptosis-related datasets showed 33 differentially expressed pyroptosis-related genes (DEPRGs) associated with pathways such as IL-17, NOD-like receptor, TNF, and Toll-like receptor signaling. A competing endogenous RNA network comprising 16 DEPRGs, 22 lncRNAs, 13 miRNAs, and 3 circRNAs was constructed. After PPI network, five hub genes (Nfkb1, Casp8, Traf6, Ptgs2, and Il18) were identified as upregulated in the diabetic group, and their expression was validated by RT-qPCR in streptozocin-induced rats. Immune infiltration characterization showed that diabetic corneas owned a higher proportion of resting mast cells, activated NK cells, and memory-resting CD4 T cells. Finally, several small compounds including all-trans-retinoic acid, Chaihu Shugan San, dexamethasone, and resveratrol were suggested as potential therapies targeting these hub genes for DK. Conclusions. The identified and validated hub genes, Nfkb1, Casp8, Traf6, Ptgs2, and Il18, may play crucial roles in DK pathogenesis and serve as therapeutic targets.