The invention provides a traditional Chinese medicine composition for treating hyperplasia of mammary glands. The traditional Chinese medicine composition is prepared from the following active ingredients in parts by weight: 1-5 parts of codonopsis pilosula, 3-8 parts of astragalus mongholicus, 1-5 parts of poria cocos, 1-5 parts of radix paeoniae alba, 1-5 parts of platycodon grandiflorum and 0.5-3 parts of liquorice. The traditional Chinese medicine composition can obviously reduce E2 and P levels in blood serum of a model rat, increases an E2 / P ratio, reduces nipple height of the model rat, relieves hyperemia and edema of a mammary tissue, reduces acinus number of lobules of the mammary glands, relieves epithelial proliferation of acinus, inhibits acinus secretion, improves the epithelial proliferation of a catheter, and has an effect of treating the hyperplasia of mammary glands. The invention further provides a method for preparing the traditional Chinese medicine composition.