Increased intake of vegetables and fruits has been associated with reduced risk of tuberculosis infection. Vegetables and fruits exert immunoregulatory effects and may be beneficial for treating pulmonary tuberculosis. However, it is not clear whether vegetables and fruits have an adjuvant treatment effect on tuberculosis. Furthermore, limited research has been conducted on the effects of colour categories and specific types of vegetables on tuberculosis treatment outcome. Between 2009 and 2013, a hospital-based cohort study was conducted in Linyi, Shandong Province, China. Treatment outcome was ascertained by sputum smear and chest computerized tomography, and dietary intake was assessed by a semi-quantitative food frequency questionnaire. The dietary questionnaire was conducted at the end of month two of treatment initiation. Participants recalled their dietary intake of the previous two months. A total of 2,309 patients were enrolled in this study. After 6 months of treatment, 2,099 patients were successfully treated and 210 were uncured. In multivariate models, higher intake of total vegetables and fruits [OR (95% CI): 0.70 (0.49-0.99)], total vegetables [OR (95% CI): 0.68 (0.48-0.97)], dark-coloured vegetables [OR (95% CI): 0.61 (0.43-0.86)], light-coloured vegetables [OR (95% CI): 0.67 (0.48-0.95)] were associated with reduced failure rate of tuberculosis treatment. No association was found between total fruit intake and reduced failure rate of tuberculosis treatment [OR (95% CI): 0.98 (0.70-1.37)]. High intake of total vegetables and fruits, especially vegetables, is associated with lower risk of failure of tuberculosis treatment in pulmonary tuberculosis patients. The results provide important information for dietary guidelines during tuberculosis treatment.