Since TLR9 recognises unmethylated CpG motifs in viral DNA, its polymorphisms may contribute to the susceptibility to Herpes simplex virus I&II infection. In the present study, to evaluate the role of rs187084 SNP (single nucleotide polymorphism) of TLR9 in Herpes simplex virus I&II infection and male infertility, 103 infertile and 27 fertile blood and semen samples were analysed. We assessed the micro and macro properties of semen specimens and the presence of HSV immunoglobulins. Tetra-primer ARMS PCR was used to detect SNP and to investigate the genotype distribution of TLR9-rs187084 SNPs, and the correlation between polymorphisms of TLR9 gene and male infertility. Moreover, the odds ratio (OR) and 95% confidence intervals were used to estimate the strength of the association. Based on our finding, a significant correlation was observed between HSV infection, agglutination and polymorphism (TT) under dominant (OR = 1.28, 95% CI = 0.94–1.75) and recessive (OR = 0.44, 95% CI = 0.21–0.94) models for the data, which was complied with Hardy–Weinberg equilibrium (HWE) (OR = 2.91, 95% CI = 1.02–8.30). The result showed a significant association between HSV IgM and agglutination in HSV infection (p < .001), and in addition, there were associations between alleles so that rs187084 SNP might be considered as a risk factor for the incidence of HSV infection.