The invention provides a traditional Chinese medicine composition for preventing and curing the postpartum agalactia, lactation lack and mastitis of livestock. The composition comprises the following components according to the parts by weight: 3-13 of angelica dahurica, 3-13 of raw radix astragali, 3-13 of angelica, 0.5-3 of pangolin and 10-30 of walnut kernel, preferably 4-8 of angelica dahurica, 4-8 of raw radix astragali, 4-8 of angelica, 0.5-2 of pangolin and 15-25 of walnut kernel. The traditional Chinese medicine composition has the functions of invigorating the vital energy, nourishing blood and Yin, promoting body fluid production, stimulating the menstrual flow, generating breast milk, resisting bacteria, diminishing inflammation, and the like, can be used for treating the postpartum agalactia or lactation lack and mastitis of livestock, such as cows, sheep, pigs, and the like, and has the obvious treatment effect and no medicine residues in the breast milk or toxic side effects. The invention also provides a preparation method of the traditional Chinese medicine composition.