Tuberculosis (TB) is a common infectious disease, and the present study aims to explore the associations of single nucleotide polymorphisms (SNPs) at rs1135216 and rs1057141 of transporter-associated antigen processing (TAP1) and rs2228396 of TAP2 with pulmonary tuberculosis (PTB) risk. A case–control study including 168 smear-positive PTB cases and 251 controls was conducted. Genotyping of the SNPs at rs1135216, rs1057141 and rs2228396 was performed, and their associations with PTB risk were analysed with SPSS software version 19.0. After conducting stratification for age, a significant association was detected for rs1057141 with increased PTB risk (OR = 0.17, 95% CI 0.04–0.79) among those aged ≥60 years. For those aged <60 years, a marginally significant association was detected between rs1135216 TC/CC and PTB risk (OR = 1.97, 95% CI 0.93–4.19). Haplotype analysis revealed that the haplotype AT at rs1135216 and rs2228396, as well as AAT at rs1057141, rs1135216 and rs2228396, was associated with increased PTB risk, and the ORs were 2.83 (95% CI 1.30–6.14) and 2.89 (95% CI 1.34–6.27), respectively. Rs1057141 is a genetic predictor of reduced PTB risk for those aged ≥60 years, while rs1135216 might be a potential genetic predictor for those aged <60 years. Haplotype AT at rs1135216 and rs2228396, as well as AAT at rs1057141, rs1135216 and rs2228396, is a genetic marker that may predict PTB risk.