A pharmaceutical composition for treating eczema is disclosed. The pharmaceutical composition includes, by weight, 2 to 6 parts of Dried Rhizoma Zingiberis Officinalis, 2 to 6 parts of Paeonia Lactiflora, 1 to 4 parts of Fructus Amomi, 0.5 to 3 parts of Semen Alpiniae Katsumadai, 0.5 to 3 parts of Inula helenium, 0.5 to 3 parts of Radix Et Rhizoma Rhei and 0.5 to 3 parts of Rhizoma Dioscoreae. The components of the pharmaceutical composition synergistically cooperate to clear and disinhibit the liver and gallbladder and clear away damp heat from the body. The pharmaceutical composition can be used to treat skin eczema symptoms caused by metabolic disorders of the liver and gallbladder functions. A method for preparing the pharmaceutical composition is also disclosed.