Sepsis patients with diabetes mellitus in the observation group were associated with the lowest CD4+ and CD8+ levels in the control group, followed by the sepsis patients in the experimental group, and then the healthy participants in the control group (P < 0.05). The gene discussed is CD8A; the disease is diabetes mellitus.