Objective: Previous studies that have found an increased risk for tuberculosis (TB) in people with diabetes mellitus (DM) have been conducted in segments of the population and have not adjusted for important potential confounders. We sought to determine the RR for TB in the presence of DM in a national population with data on confounding factors in order to inform the decision-making process about latent tuberculosis infection (LTBI) screening in people with diabetes. Design: Whole population historical cohort study. Setting: All Australian States and Territories with a mean TB incidence of 5.8/100 000. Participants: Cases of TB in people with DM were identified by record linkage using the National Diabetes Services Scheme Database and TB notification databases for the years 2001-2006. Primary and secondary outcome measures: Primary outcome was notified cases of TB. Secondary outcome was notified cases of culture-confirmed TB. RR of TB was estimated with adjustment for age, sex, TB incidence in country of birth and indigenous status. Results: There were 6276 cases of active TB among 19 855 283 people living in Australia between 2001 and 2006. There were 271 (188 culture positive) cases of TB among 802 087 members of the DM cohort and 130 cases of TB among 273 023 people using insulin. The crude RR of TB was 1.78 (95% CI 1.17 to 2.73) in all people with DM and 2.16 (95% CI 1.19 to 3.93) in people with DM using insulin. The adjusted RRs were 1.48 (95% CI 1.04 to 2.10) and 2.27 (95% CI 1.41 to 3.66), respectively. Conclusions: The presence of DM alone does not justify screening for LTBI. However, when combined with other risk factors for TB, the presence of DM may be sufficient to justify screening and treatment for LTBI.