Objective To investigate the diagnostic value of systemic immune inflammation index(SII) and helper T cell 17 (Th17)/ regulatory T cell (Treg) ratio in ankylosing spondylitis (AS). Methods Seventy-five patients with AS were selected as the observation group, and 75 gender and age matched healthy examinees were selected as the control group. The neutrophil count (NEU), platelet count (PLT), lymphocyte count (LY), SII, Th17, Treg, Th17/Treg ratio, interleukin (IL)-17, IL-23 levels were compared between the two groups. Multivariate Logistic regression model was used to analyze the influencing factors of AS occurrence, and receiver operating characteristic (ROC) curve was used to evaluate the diagnostic value of these influencing factors in diagnosing AS both individually and in combination. Results In the observation group, the values of SII, NEU, PLT, Th17/Treg ratio, as well as the serum levels of IL-17 and IL-23 were higher than those in the control group, while their LY, Th17 and Treg were lower than those in the control group (P<0.05). The results of multivariate Logistic regression analysis showed that SII, PLT, LY, Th17, Treg, Th17/Treg ratio, as well as the levels of IL-17 and IL-23 were influencing factors for the occurrence of AS (P<0.05). The ROC curve results indicated that the areas under the curves for SII, PLT, LY, Th17, Treg, Th17/Treg ratio, as well as IL-17, IL-23 levels, and their combined diagnosis in identifying AS patients were 0.884, 0.775, 0.896, 0.736, 0.796, 0.617, 0.865, 0.824, 0.995, respectively. Conclusion SII, PLT, LY, Th17, Treg, Th17/Treg ratio, as well as the levels of IL-17 and IL-23 are influencing factors of AS, and their combination has a high predictive value for the diagnosis of AS.