The invention discloses a medicine for treating damp-heat stasis syndrome of liver cirrhosis spontaneous bacterial peritonitis and a preparation method thereof, and aims to solve the technical problems of liver and kidney function damage and gradually increased drug resistance rate in western medicine anti-infection treatment. The medicine is mainly prepared from fructus polygoni orientalis, verbena, rheum officinale, lalang grass rhizome, pinellia ternate, coptis chinensis, scutellaria baicalensis, codonopsis pilosula, rhizoma zingiberis, liquorice and the like. The medicine is scientific and reasonable in compatibility, has good effects of clearing heat and promoting diuresis, eliminating mass and removing stasis, and detoxifying and relaxing bowels, focuses on removing damp-heat stasis toxin and excess evil, also can be used for nourishing vital energy, and combining tonification and purgation, so that Qi, blood and water are harmonized, and various symptoms are reduced; and the medicine can be used for effectively treating damp-heat stasis syndrome type spontaneous bacterial peritonitis, and is rich in raw material source, convenient to take, relatively low in cost, safe and free of toxic or side effect.