KEGG enrichment analysis revealed that NF-κB and MAPK signaling pathways play crucial roles in the DM–TB pathogenic mechanism, and immune infiltration analysis showed significant suppression of certain adaptive immune cells and activation of inflammatory cells in DM–TB patients. Here, NFKB1 is linked to diabetes mellitus.