Objective To analyze the efficacy of Genexpert MTB / RIF in the detection of Mycobacterium tuberculosis and rifampicin resistance in different types of specimens, and we evaluate the valve of Genexpert MTB / RIF to detect Mycobacterium tuberculosis. Methods Totally 7 687 specimens of BACTEC MGIT 960 culture (MGIT 960) positive in Xi'an Chest Hospital from January 1, 2019 to December 31, 2020 were selected as the research objects, MGIT 960 and Micro DST test were used as standard to analyze the efficacy of GeneXpert MTB/RIF to detect Mycobacterium tuberculosis (MTB) and its drug resistance in different sputums. Results With MGIT 960 as standard, the sensitivity of GeneXpert MTB / RIF of detect MTB in sputum samples, bronchoalveolar lavage samples (BALF), serous cavity effusion, pus and tissue samples were 75.1% (653/869), 82.1% (1 093/1 332), 57.3% (110/192), 80.0% (60/75), 77.3% (34/44), and had significant difference between these specimens (χ² = 64.100, P < 0.001). With Micro DST as standard, the sensitivity, specificity, positive predictive value, negative predictive value and Kappa value of GeneXpert MTB / RIF in detecting rifampicin resistance of Mycobacterium tuberculosis were 95.3%, 95.2%, 74.9%, 99.3% and 0.81 respectively; With Micro DST as standard, the sensitivity, specificity and Kappa value of GeneXpert MTB / RIF in detecting rifampicin resistance in sputum samples, BALF, serous cavity effusion, pus and tissue samples were 94.6%, 95.1%, 0.83; 95.1%, 95.2%, 0.78; 100%, 97.3%, 0.89; 100%, 92.3%, 0.73l100%, 90.9%, 0.86. Conclusion GeneXpert MTB / RIF has high sensitivity in the detection of Mycobacterium tuberculosis in sputum samples, BALF, serous cavity effusion, pus and tissue samples, and can be used as an effective method for the detection of tuberculosis. The accuracy of GeneXpert MTB / RIF in detecting rifampicin resistance of Mycobacterium tuberculosis was higher in sputum samples, BALF, serous cavity effusion (including pleural fluid, ascites and cerebrospinal fluid), pus and tissue samples.