The study of ankylosing spondylitis (AS) has made significant progress over the last decade. Genome-wide association studies have identified and further substantiated the role of susceptibility genes outside the major histocompatibility complex locus. However, human leukocyte antigen (HLA)-B27 has been suggested to be important in the pathogenesis of AS, contributing to similar to 20.1% of AS heritability. The current review will present the classical and non-classical forms of HLA-B27, as well as their pathogenic roles, and further discuss the hypotheses regarding the potential pathogenesis of AS. In addition, the association between the pathogenic role of HLA-B27 and inflammatory indexes, including the interleukin-23/-17 axis will be investigated to provide novel insights into the pathogenesis of AS. The aim of the present review is to provide an update of the current research into the pathogenesis of AS, and provide a comprehensive description of the pathogenic role of HLA-B27 in AS.