BackgroundAlthough tuberculosis (TB) patients coinfected with HIV are at risk of poor treatment outcomes, there is paucity of data on changing trends of TB/HIV co-infection and their treatment outcomes. This study aims to estimate the burden of TB/HIV co-infection over time, describe the treatment available to TB/HIV patients and estimate the effect of TB/HIV co-infection on TB treatment outcomes.MethodsThis was a retrospective data analyses from TB surveillance in two counties in Kenya (Nyeri and Kilifi): 2012‒2020. All TB patients aged ≥ 18 years were included. The main exposure was HIV status categorised as infected, negative or unknown status. World Health Organization TB treatment outcomes were explored; cured, treatment complete, failed treatment, defaulted/lost-to-follow-up, died and transferred out. Time at risk was from date of starting TB treatment to six months later/date of the event and Cox proportion with shared frailties models were used to estimate effects of TB/HIV co-infection on TB treatment outcomes.ResultsThe study includes 27,285 patients, median (IQR) 37 (29‒49) years old and 64% male. 23,986 (88%) were new TB cases and 91% were started on 2RHZE/4RH anti-TB regimen. Overall, 7879 (29%, 95% 28‒30%) were HIV infected. The proportion of HIV infected patient was 32% in 2012 and declined to 24% in 2020 (trendP-value = 0.01). Uptake of ARTs (95%) and cotrimoxazole prophylaxis (99%) was high. Overall, 84% patients completed six months TB treatment, 2084 (7.6%) died, 4.3% LTFU, 0.9% treatment failure and 2.8% transferred out. HIV status was associated with lower odds of completing TB treatment: infected Vs negative (aOR 0.56 (95%CI 0.52‒0.61) and unknown vs negative (aOR 0.57 (95%CI 0.44‒0.73). Both HIV infected and unknown status were associated with higher hazard of death: (aHR 2.40 (95%CI 2.18‒2.63) and 1.93 (95%CI 1.44‒2.56)) respectively and defaulting treatment/LTFU: aHR 1.16 (95%CI 1.01‒1.32) and 1.55 (95%CI 1.02‒2.35)) respectively. HIV status had no effect on hazard of transferring out and treatment failure.ConclusionThe overall burden of TB/HIV coinfection was within previous pooled estimate. Our findings support the need for systematic HIV testing as those with unknown status had similar TB treatment outcomes as the HIV infected.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12879-023-08347-0.