Objectives To investigate whether an unrecognised diagnosis of tuberculosis (TB) at the start of antiretroviral therapy (ART) influences subsequent CD4+ T cell (CD4) count recovery in an urban HIV clinic in Uganda. Methods In a retrospective cohort study, a multivariable polynomial mixed effects model was used to estimate CD4 recovery in the first 96 weeks of ART in two groups of patients: prevalent TB (started ART while on TB treatment), unrecognised TB (developed TB within 6 months after start ART). Results Included were 511 patients with a median baseline CD4 count of 57 cells/mm(3) (interquartile range: 22-130), of whom 368 (72%) had prevalent TB and 143 (28%) had unrecognised TB. Compared with prevalent TB, unrecognised TB was associated with lower CD4 count recovery at 96 weeks: -22.3 cells/mm(3) (95% confidence interval -43.2 to -1.5, P = 0.036). These estimates were adjusted for gender, age, baseline CD4 count and the use of zidovudine-based regimen. Conclusions Unrecognised TB at the time of ART initiation resulted in impaired CD4 recovery compared with TB treated before ART initiation. More vigilant screening with more sensitive and rapid TB diagnostics prior to ART initiation is needed to decrease the risk of ART-associated TB and sub-optimal immune reconstitution.