Obesity affects immune function by increasing the number of T helper lymphocytes, which may reduce the risk of tuberculosis (TB) infection. However, the effect of obesity on TB development has not been extensively studied. This nationwide population-based cohort study investigated the effect of obesity on TB development in Taiwanese adults. We included 46 028 adult participants (age ⩾18 years) from three rounds (2001, 2005 and 2009) of the Taiwan National Health Interview Survey. Obesity and overweight were defined as a body mass index (BMI) ⩾27 and 24-26.9 (kg/m2), respectively. Data on BMI and other covariates at baseline were collected by in-person interviews. Incident cases of active TB were identified from the National Health Insurance database. Multivariable logistic regression was used to estimate the associations of obesity and overweight with active TB, with adjustment for age, sex, smoking, alcohol consumption, socioeconomic status and other covariates. In total, 241 new cases of active TB occurred during the study period. Obesity (adjusted odds ratio [AOR], 0.43; 95% confident interval [CI], 0.28-0.67) and overweight (AOR, 0.67; 95% CI, 0.49-0.91) were associated with lower risk of incident TB, after adjusting for demographic characteristics and comorbidities. There was a linear dose-response relation of BMI with active TB incidence (AOR per unit change in BMI, 0.92; 95% CI, 0.88-0.95; P <0.001). Obesity and overweight are associated with lower risk of active TB. Future studies should investigate the underlying mechanisms and clinical and epidemiological consequences of these findings.