Background: Pili producing genes in different life cycles of Mycobacterium tuberculosis (M. tuberculosis) were assessed. M. tuberculosis has two life cycles: dormant and active states. We aimed to assess the pili producing genes such as curli pili of M. tuberculosis (mtp) encoded by the mtp gene (Rv3312A) and fimbrial low-molecular-weight protein encoded by flp gene (Rv3656c) which were compared and analyzed. Methods: Two hundred M. tuberculosis isolates were investigated both at active and dormant states for production and expression of pili. The dormant M. tuberculosis was achieved by incubation in a sealed tube (modified Wayne method). The susceptibility of M. tuberculosis was evaluated on genes, rpob, inh, katg, and gyra by using multiplex polymerase chain reaction (PCR) and single-strand conformational polymorphism methods. The PCR–restriction fragment length polymorphism was used to express pili genes mtp and flp and then the PCR products was digested using restriction enzyme Fnu4HI, XmaI, and MspJI and AciI, TagII, and HaeII, respectively. The transmission electron microscopy was also used to detect pili in different isolates. The result was compared and analyzed using H37RV as a gold standard. Results: The mtp and flp PCR products were 263 and 122 bp in the studied strains irrespective of M. tuberculosis different life cycles, respectively. The PCR products were analyzed on 8% Polyacrylamide gel electrophoresis (PAGE), and in the 180/200 (20%), producing five fragments of 25,40,45,63,90 bp with the Fun4HI and two fragments of 126,138 bp with the XmaI and uncut with the MspJI for mtp gen were obtained at the dormant and active states of M. tuberculosis (P < 0.05). Similarly in flp gene producing three fragments of 22,35,65 bp with AciI and two fragments of 35.87 bp with TagII and two fragments of 38.84 bp with HaeII were obtained (P < 0.05). In contrast to genotyping analysis, the electron microscopy examination showed protruding of pili from M. tuberculosis, especially in dormant mycobacterium (15/100; 15%), that was multidrug resistance and extensive drug resistance isolates (P > 0.05). Conclusion: Pili were shown by electron microscopy, although at the gene expression, the insignificant difference was observed at the dormant strains in comparison to active states. Therefore, we may conclude that other genes might be involved in pili production of M. tuberculosis that needs further investigation. Although, the resistance phenomena might influence the pili producing gene expression that showed in our results.