Objective To compare the TaqMan fluorescence PCR detection results between mycoplasma genitalium 16SrRNA gene and MgPa gene. Methods Mycoplasma genitalium 16SrRNA gene and MgPa gene were selected as target genes. According to the reported literatures, the specific amplified primers and probes were designed and synthesized. Urinary tract swab specimens were detected by TaqMan fluorescent PCR. The results of TaqMan fluorescence PCR detection of different target genes of Mycoplasma genitalium were statistically analyzed. Results The detection sensitivity of 16SrRNA gene and MgPa gene of mycoplasma genitalium TaqMan PCR was 90% and 97.5%, respectively. Conclusions The sensitivity of TaqMan PCR in the genital mycoplasma MgPa gene is higher than that of the 16SrRNA gene.