Diabetic foot ulcers (DFUs) are one of the most common and challenging complications of diabetes, yet our understanding of their pathogenesis remains limited. We collected gene expression data of DFU patients from public databases. Bioinformatics tools were applied for systematic analysis, including the identification of differentially expressed genes (DEGs), weighted gene co‐expression network analysis (WGCNA) and enrichment analysis. We further used single‐cell RNA sequencing to identify the distribution of different cell populations in DFU. Finally, key results were validated using reverse transcription‐quantitative polymerase chain reaction (RT‐qPCR) and flow cytometry. We identified 217 DEGs between ulcerated and healthy skin, and 37 DEGs between healing ulcers and ulcers. WGCNA revealed that the cyan module had the highest positive correlation with healthy skin and negative correlation with ulcers. The black module had the highest negative correlation with healthy skin and positive correlation with ulcers. Enrichment analysis showed that the genes in the cyan module were mainly associated with complement and coagulation cascades, while the genes in the black module were mainly associated with the IL‐17 signalling pathway. In addition, CD8 T cells were significantly lower in ulcers than in healthy and healing ulcers. By comparing marker genes of CD8 T cells, we identified key genes in the cyan and black modules and validated their expression using RT‐qPCR. The proportion of CD8 T cells was increased in healing ulcers. Flow cytometry detected increased levels of CD8 T, B and natural killer cells in healing ulcers. CD8 T cells and related key genes play an important role in the healing process of DFU. The results of this study provide a new perspective for understanding the pathogenesis and treatment of DFU.