ObjectivesTo evaluate the accuracy of the CapitalBio Mycobacterium real-time polymerase chain reaction (RT-PCR) detection test for pulmonary Mycobacterium tuberculosis (MTB) and nontuberculous mycobacterial (NTM) infection. MethodsThis study analyzed 2,460 samples from patients with suspected pulmonary mycobacterial infection collected between 01 June 2018 and 31 July 2019. It aimed to determine the sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and area under the curve (AUC) of the CapitalBio Mycobacterium detection test for MTB and NTM infections, and to evaluate its diagnostic accuracy compared with mycobacterial culture. ResultsThe sensitivity, specificity, PPV, NPV, and AUC of the CapitalBio Mycobacterium detection test for MTB was 83.0%, 79.9%, 80.8%, 82.2%, and 0.81, respectively. This was similar to the diagnostic accuracy of Xpert MTB/RIF for MTB and was significantly higher than that of smear. For pulmonary NTM infection, the sensitivity, specificity, PPV, NPV, and AUC of the test was 82.0%, 99.6%, 94.1%, 98.5%, and 0.91, respectively. The diagnostic accuracy of the CapitalBio Mycobacterium detection test was also significantly higher than that of smear for NTM. ConclusionsThe CapitalBio Mycobacterium detection test had good diagnostic accuracy for MTB and NTM infections. This is of great significance for the differential diagnosis of early pulmonary mycobacterial infection.