BackgroundAnkylosing spondylitis (AS) is a chronic inflammatory joint disorder, necessitating early diagnosis and effective treatment. The specific mechanism of action of Cassia twigs in the treatment of AS is not fully understood. MethodsBlood samples and clinical data from 28,458 individuals (6,101 with AS, 22,357 without AS) were collected. To construct a predictive model, we utilized logistic regressions and machine learning techniques to create a dynamic nomogram. Immune cell infiltration was evaluated using the GSE73754 dataset. Subsequently, we obtained vertebral bone marrow blood from AS patients for 10X single-cell sequencing. We also extracted and purified total RNA from hip joint ligament tissue samples from six AS patients and six non-AS patients. The genes related to the expression of AS and Cassia twigs were analyzed comprehensively, and the specific drug targets were identified by molecular docking. The interactions between immune cells through cell communication analysis were elucidated. ResultsWe developed a dynamic nomogram incorporating the neutrophil count (NEUT) and other variables. Neutrophil immune responses were confirmed through immune infiltration analysis utilizing GSE73754. We observed the early involvement of neutrophils in the pathology of AS. The CAT-expressing Cassia twigs gene could be used as a drug target for the treatment of AS. Moreover, comprehensive RNA analysis revealed notable CAT expression in neutrophils and various other immune cells. ConclusionsNeutrophils play dual roles in AS, regulating inflammation and initiating differentiation signals to other cells. The CAT gene, which is expressed in Cassia twigs, has emerged as a potential therapeutic target for AS treatment.