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). This evidence concerns the gene CD4 and diabetes mellitus.