Vitamin D deficiency (VDD) is common in tuberculosis (TB) and may be implicated in the etiology of the disease and in its clinical course. The aim of this study was to investigate the association between leptin, inflammatory markers and VD status in TB patients, stratified for presence or absence of diabetes mellitus (DM). Two hundred ninety-nine TB patients were recruited from October 2015 to August 2016. Also, 91 normal controls were included. The information including socio-demographics, dietary intake and living habits was obtained by face-to-face interview. Serum concentrations of leptin and TNF-α, CRP and IL-6 were compared between TB patients with and without severe VDD (SVDD). Pearson’s correlation was used to analyze the association between TNF-α, leptin and 25-hydroxyvitamin D (25(OH)D). A significantly higher prevalence of VDD and SVDD was observed in TB patients compared with normal controls (93.0% vs 70.3%, 65.9% vs 3.3% respectively). Concentration of leptin was significantly lower, while TNF-α higher in TB patients with SVDD compared to those without ( p <0.05). After adjustment for confounders, leptin was positively associated with 25(OH)D ( r =0.210, p =0.002) with similar correlation in TB patients with DM ( r =0.240, p =0.020). A negative association between TNF-α and 25(OH)D was observed ( r =−0.197, p =0.003), which was significant only in the subgroup without DM ( r =−0.304, p =0.001). Our findings indicate that a higher VD status in TB patients may be related to higher immune activity and less serious tissue damage, and that this relation is different according to presence or absence of DM co-morbidity.