Ultraviolet (UV) B-induced damage in human epidermal keratinocytes (HEKs) initiates photocarcinogenesis. However, how diabetes influences photocarcinogenesis is not well understood. To investigate the impact of high-glucose environments on responses to UVB, we cultured HEKs in normal-glucose (NG) or high-glucose (HG) conditions (G6 and G26), followed by UVB irradiation at 25 mJ/cm2 (G6UVB and G26UVB). We performed next-generation sequencing and analyzed HEKs' expression profiles bioinformatically to identify candidate genes and cellular responses involved. We found UVB induced consistent responses in both NG- and HG-cultivated HEKs, but it also triggered certain distinct processes and pathways specifically in the HG groups. The 459 differentially expressed (DE) genes in the HG groups revealed their roles in chromatin remodeling, nucleosome assembly, and interferon signaling activation. Moreover, the 29 DE genes identified in G26UVB/G6UVB comparison, including the potent tumor suppressor gene TFPI2, were considered key genes contributing to HEKs' altered response to UVB in HG environments. UVB irradiation induced significantly higher TFPI2 expression in HG-cultivated HEKs than their NG-cultivated counterpart. Finally, HG-cultivation significantly increased oxidative stress, cyclobutane pyrimidine dimer formation, and apoptosis, while reducing HEKs' viability after UVB irradiation. These changes under HG conditions probably mediate cell fate toward death and tumor regression. Overall, our findings provide evidence and associated molecular basis on how HG conditions reduce keratinocytes' photocarcinogenic potential following UVB exposure.