ObjectivesDue to the paucity of literature on risk factors for tuberculosis (TB)-related death, we determine the sociodemographic and clinical risk factors associated with TB-related deaths among adult pulmonary TB (PTB) patients on treatment in Selangor, Malaysia.DesignRetrospective cohort study.SettingRoutinely collected primary care data from all government TB clinics in Selangor.ParticipantsData of 24 570 eligible adult PTB patients from 2013 to 2019 were obtained from Selangor’s State Health Department surveillance records. We included PTB patients aged at least 15 years old at the time of diagnosis with complete documentation of the dates of diagnosis, treatment initiation, end of treatment/follow-up and treatment outcomes. We excluded patients whose diagnoses were changed to non-TB, post-mortem TB diagnosis and multidrug-resistant TB (MDR-TB) patients.Primary and secondary outcome measuresTB-related death, determined from the recorded physicians’ consensus during the TB mortality meeting.ResultsTB-related death was significantly associated with far (adjusted HR (aHR) 9.98, 95% CI 4.28 to 23.28) and moderately advanced (aHR 3.23, 95% CI 1.43 to 7.31) radiological findings at diagnosis; concurrent TB meningitis (aHR 7.67, 95% CI 4.53 to 12.98) and miliary TB (aHR 6.32, 95% CI 4.10 to 9.74) involvement; HIV positive at diagnosis (aHR 2.81, 95% CI 2.21 to 3.57); Hulu Selangor (aHR 1.95, 95% CI 1.29 to 2.93), Klang (aHR 1.53, 95% CI 1.18 to 1.98) and Hulu Langat (aHR 1.31, 95% CI 1.03 to 1.68) residing districts; no formal education (aHR 1.70, 95% CI 1.23 to 2.35); unemployment (aHR 1.54, 95% CI 1.29 to 1.84), positive sputum smear acid-fast bacilli (AFB) at diagnosis (aHR 1.51, 95% CI 1.22 to 1.85); rural residency (aHR 1.39, 95% CI 1.13 to 1.72) and advancing age (aHR 1.03, 95% CI 1.02 to 1.03).ConclusionsFar and moderately advanced radiological findings, concurrent TB meningitis and miliary TB involvement, HIV positive, Hulu Selangor, Klang and Hulu Langat residing districts, no formal education, unemployment, positive sputum smear AFB, rural residency and advancing age are risk factors of TB-related death. Our findings should assist in identifying high-risk patients requiring interventions against TB-related death.