The invention discloses a medicine for treating ankylosing spondylitis and a preparation method of the medicine. The medicine comprises various active pharmaceutical ingredient as follows: herb of rice galingale, cassia bark, boxthorn fruit, cortex lycii radicis, arthraxon hispidus, rubia tinctorum madder root, corydalis cheilanthifolia, cattail pollen, cassia twig, radix rhapontici, Szechuan lovage rhizome, berchemia lineata, whitebracteole bugle herb, root or stem of evergreen mucuna, jamaica falsevalerian herb, rhizoma sparganii, tripterospermum volubile, falcate dolichos root or leaf, common pratia herb, diversifolious patrinia root, irid, smilacina japonica, teasel root, fructus leonuri, achyranthes bidentata, homalomena occulta and common clubmoss herb. The medicine has the efficacies of nourishing the liver and kidney, dispelling wind to eliminate dampness, and strengthening muscles and bones, together with the functions of dredging collaterals and activating blood circulation to remove blood stasis, and has the advantages of being instant in effect, high in effective rate, exact in treatment effect, short in treatment course, free of toxic or side effect, and low in price.