Ankylosing spondylitis (AS) is a highly heritable complex inflammatory arthritis disease. Genetic factors are thought to be crucial in the pathogenesis of AS. However, few data are available on the relationship between HLA-DP/DQ and STAT4 polymorphisms and AS susceptibility in the Chinese population. Therefore, we examined HLA-DP/DQ and STAT4 polymorphisms (rs3077, rs9277535, rs7453920 and rs7574865) in a total of 779 subjects, including 400 AS and 379 age- and sex-matched healthy controls in Chinese. No significant difference was observed between AS patients and healthy controls in the allele frequency of rs3077, rs9277535 and rs7574865. However, there was a significant association between the HLA-DQ rs7453920 G/A variant and AS patients, with minor allele A correlated with a reduced risk of AS (allelic frequency, adjusted OR = 0.66, 95% CI = 0.55–0.78, p = 4.0E − 06; dominant model, adjusted OR = 0.75, 95% CI = 0.66–0.85, p = 1.1E − 05). Moreover, the haplotypes block AAA and GGA in the HLA gene significantly correlated with reduced risk of AS. This is the first study demonstrating the significant associations of SNP rs7453920 and the haplotypes in the HLA gene with the risk of AS in Southwest Chinese population. This research sheds new light on the significant relationship between HLA polymorphisms and AS.