Based on the data mining method, the administration rules of TCM enema combined with mesalazine in the treatment of ulcerative colitis (UC) in journal literature were analyzed, and the basis for screening the best enema treatment drugs was provided. Methods The literatures of clinical randomized trials of TCM enema combined with mesalazine in the treatment of UC published in recent 10 years were retrieved from China National Knowledge Network, Wanfang Data Knowledge Service platform, Wep database and China Biomedical database. The database was established and the data mining was conducted from the aspects of enema high‐frequency drug frequency, drug flavor, drug efficacy, drug pair association and so on. 95 literatures were included, including 95 enema formulas. There were 102 commonly used drugs, and 22 drugs with frequency ≥10%. The top 10 drugs were Phellodendri Phellodendri, Rhizoma coptidis, Radix bulgosa, Radix sanguinae, Radix sophora flavescens, Radix scutellariae, Chekhoa, Radix notoginseng and licorice. Among the drugs involved, heat‐clearing and moisture‐drying drugs accounted for 29.41%, heat‐clearing antidotes accounted for 16.18%, lungactivating and astringent intestinal drugs accounted for 7.60%, and astringent and hemostatic drugs accounted for 6.86%. The medicinal properties are mainly cold, warm and flat. The use of medicinal flavor is mainly bitter, sweet and astringent. By drug association analysis, it was concluded that common drug combinations were added or subtracted based on Radix Paektuonis decoction. Conclusion The results of medication law obtained from data mining showed that: clearing heat and drying dampness, astringence and hemostasis, cooling blood and invigorating muscle, at the same time taking into account the spleen and liver tonifying, cold and heat Qi and blood leveling, attacking evil and invigorating. Clinical prescription drugs are mainly based on Baitouong decoction, with the increase or decrease of the syndrome.