Considering the high prevalence of tuberculosis (TB) in developing countries and the fact that comorbidity with diabetes mellitus (DM) imposes a higher burden on the society, this study was carried out to assess the prevalence of diabetes and its related factors in patients with TB in Mashhad, Iran. In this study, we enrolled 405 patients over the age of 18 who had been diagnosed with TB between the years 2015 and 2016 according to the documents of the ministry of health. The participants were selected randomly from five health center domains based on the stratified sampling method. The patients were screened for diabetes according to HbA1c over 6.5% or a fasting blood sugar (FBS) level over 126 mg/dL at different time points and the patient's self-report of having DM. The mean age of participants was 51.14±20.52 (19-92 years). The prevalence of DM in patients with TB was 21.2%, of whom 3.5% were newly diagnosed. Among potential factors, age with OR=3.786 (1.183, 12.113), body mass index with OR=9.149 (3.182, 26.302), nationality with OR=2.149 (1.122, 4.117) and TB type with 3.328 (1.44, 7.689) were associated with DM in patients with TB. The prevalence of DM in our study was higher than that observed in other countries. Our study showed associated factors like age, body mass index, and TB type to be very important. Also, the prevalence of DM was different in patients with different nationality.