SETTING: Achieving the World Health Organization (WHO) target of zero paediatric tuberculosis (TB) deaths will require an understanding of the underlying risk factors for mortality. OBJECTIVE: To identify risk factors for mortality and assess the impact of human immunodeficiency virus (HIV) testing during anti-tuberculosis treatment in children in 13 TB-HIV programmes run by Medecins Sans Frontieres. DESIGN: In a retrospective cohort study, we recorded mortality and analysed risk factors using descriptive statistics and logistic regression. Diagnosis was based on WHO algorithm and smear microscopy. RESULTS: A total of 2451 children (mean age 5.2 years, SD 3.9) were treated for TB. Half (51.0%) lived in Asia, the remainder in sub-Saharan Africa; 56.0% had pulmonary TB; 6.4% were diagnosed using smear microscopy; 211 (8.6%) died. Of 1513 children tested for HIV, 935 (61.8%) were positive; 120 (12.8%) died compared with 30/578 (5.2%) HIV-negative children. Risk factors included being HIV-positive (OR 2.6, 95%CI 1.6-4.2), age <5 years (1.7, 95%CI 1.2-2.5) and having tuberculous meningitis (2.6, 95%CI 1.0-6.8). Risk was higher in African children of unknown HIV status than in those who were confirmed HIV-negative (1.9, 95%CI 1.1-3.3). CONCLUSIONS: Strategies to eliminate childhood TB deaths should include addressing the high-risk groups identified in this study, enhanced TB prevention, universal HIV testing and the development of a rapid diagnostic test.