We identified 1090 DEGs associated with DM–TB and further pinpointed CETP (cholesteryl ester transfer protein) (AUC = 0.804, CI: 0.744–0.864), TYROBP (TYRO protein tyrosine kinase binding protein) (AUC = 0.810, CI: 0.752–0.867), and SECTM1 (secreted and transmembrane protein 1) (AUC = 0.811, CI: 0.757–0.864) as immune-related biomarkers for DM–TB patients. Here, SECTM1 is linked to diabetes mellitus.