BACKGROUND: WHO recommends Xpert MTB/RIF as initial diagnostic testing for tuberculous meningitis. However, diagnosis remains difficult, with Xpert sensitivity of about 50-70% and culture sensitivity of about 60%. We evaluated the diagnostic performance of the new Xpert MTB/RIF Ultra (Xpert Ultra) for tuberculous meningitis. METHODS: We prospectively obtained diagnostic cerebrospinal fluid (CSF) specimens during screening for a trial on the treatment of HIV-associated cryptococcal meningitis in Mbarara, Uganda. HIV-infected adults with suspected meningitis (eg, headache, nuchal rigidity, altered mental status) were screened consecutively at Mbarara Regional Referral Hospital. We centrifuged CSF, resuspended the pellet in 2 mL of CSF, and tested 0·5 mL with mycobacteria growth indicator tube culture, 1 mL with Xpert, and cryopreserved 0·5 mL, later tested with Xpert Ultra. We assessed diagnostic performance against uniform clinical case definition or a composite reference standard of any positive CSF tuberculous test. FINDINGS: From Feb 27, 2015, to Nov 7, 2016, we prospectively evaluated 129 HIV-infected adults with suspected meningitis for tuberculosis. 23 participants were classified as probable or definite tuberculous meningitis by uniform case definition, excluding Xpert Ultra results. Xpert Ultra sensitivity was 70% (95% CI 47-87; 16 of 23 cases) for probable or definite tuberculous meningitis compared with 43% (23-66; 10/23) for Xpert and 43% (23-66; 10/23) for culture. With composite standard, we detected tuberculous meningitis in 22 (17%) of 129 participants. Xpert Ultra had 95% sensitivity (95% CI 77-99; 21 of 22 cases) for tuberculous meningitis, which was higher than either Xpert (45% [24-68]; 10/22; p=0·0010) or culture (45% [24-68]; 10/22; p=0·0034). Of 21 participants positive by Xpert Ultra, 13 were positive by culture, Xpert, or both, and eight were only positive by Xpert Ultra. Of those eight, three were categorised as probable tuberculous meningitis, three as possible tuberculous meningitis, and two as not tuberculous meningitis. Testing 6 mL or more of CSF was associated with more frequent detection of tuberculosis than with less than 6 mL (26% vs 7%; p=0·014). INTERPRETATION: Xpert Ultra detected significantly more tuberculous meningitis than did either Xpert or culture. WHO now recommends the use of Xpert Ultra as the initial diagnostic test for suspected tuberculous meningitis. FUNDING: National Institute of Neurologic Diseases and Stroke, Fogarty International Center, National Institute of Allergy and Infectious Disease, UK Medical Research Council/DfID/Wellcome Trust Global Health Trials, Doris Duke Charitable Foundation