The invention relates to a pharmaceutical composition of treating prostatitis. The pharmaceutical composition is prepared from the following substances by weigh ratio: perfoliote knotweed herb, radix pseudostellariae, fructus broussonetiae, Chinese mahonia stem, manchurian lilac bark, bighead atractylodes rhizome, medulla helwingiae, pseudo-ginseng, witloof, gastrodia elata, thlaspi arvense, dioscorea spongiosa, pinellia ternate, loofah sponge, concha arcae, justicia gendarussa, arisaema cum bile, reddish orange, immature bitter orange, hooker winghead root, tuckahoe, seed of feather cockscomb, liquorice, rhizoma nelumbinis, herba siegesbeckiae, ginger, white lablab bean, semen coicis, semen coicis, chinaroot greenbrier, radix angelicae, sauropus spatulifolius, cortex dictamni, angelica sinensis, ligusticum wallichii, piper cubeba, root of common peony, peach kernel, spina date seed, peucedanum decursivum maxim and kapok. The pharmaceutical composition for treating prostatitis disclosed by the invention has the characteristics of being low in cost, easy to prepare, small in toxic and side effects, significant in curative effect.