Tuberculosis (TB) is an infectious disease caused by Mycobacterium tuberculosis, primarily affecting the lungs, and remains a major global health concern. Transmission occurs through airborne droplets when an infected individual coughs or sneezes. Rapid and accurate diagnosis is essential to determine appropriate treatment and prevent further transmission. This study aims to analyze the sensitivity and specificity of the Ziehl–Neelsen (ZN) method compared to the GeneXpert method in sputum examination of pulmonary TB patients at Melur Public Health Center, Pekanbaru City, in 2025. This research employed an analytical design with a cross-sectional approach. The samples consisted of sputum specimens from suspected pulmonary TB patients examined using two methods: Ziehl–Neelsen microscopy and the molecular GeneXpert technique. The examination results were analyzed to calculate sensitivity, specificity, positive predictive value (PPV), and negative predictive value (NPV). The findings revealed that the most prevalent age group was ?20 years (27.4%), with a majority of female patients (53%). The comparison between Ziehl–Neelsen and GeneXpert results showed a sensitivity of 42.9%, specificity of 100%, PPV of 100%, and NPV of 93.2%. The Ziehl–Neelsen method demonstrated high specificity, indicating a strong ability to identify non-TB individuals with a low rate of false positives. However, its sensitivity was relatively low compared to GeneXpert, suggesting a higher risk of false negatives. Therefore, the combination of microscopic and molecular diagnostic methods is recommended to enhance diagnostic accuracy and support effective TB control in primary healthcare settings.