This study harnessed bioinformatics and artificial intelligence technologies to identify three immune biomarkers associated with DM–TB—CETP, TYROBP, and SECTM1—and constructed an early risk alert model, offering novel strategies for early screening and immune intervention in DM–TB patients. This evidence concerns the gene TYROBP and diabetes mellitus.