The invention discloses a traditional Chinese medicine composition for treating piglet diarrhea and a preparation method of the traditional Chinese medicine composition, belongs to the technical field of veterinary medicines, and aims to solve the problems that existing antibiotic medicines are easy to generate drug resistance and existing traditional Chinese medicines are single in treatment disease. The traditional Chinese medicine composition comprises the following raw materials: codonopsis pilosula, astragalus membranaceus, coptis chinensis, scutellaria baicalensis, turmeric, clove, pokeberry root, phoenix-tail fern, medicated leaven, fried coix seed, fructus psoraleae, purslane, dandelion and liquorice. The preparation method comprises the following steps: crushing the raw materials into particles, mixing codonopsis pilosula, astragalus membranaceus, dandelion, coptis chinensis, radix scutellariae, fried coix seeds, fructus psoraleae and purslane according to the formula amount, and carrying out a reflux extraction method; mixing the other raw materials according to the formula amount, and extracting by a decoction method; and mixing the extracting solutions, concentrating to obtain an extract, adding auxiliary materials in an equal amount, grinding, sieving, and drying to obtain the traditional Chinese medicine composition. The traditional Chinese medicine composition disclosed by the invention can be used for replacing antibiotic medicines, is effective for diarrhea of piglets caused by various reasons, and can be used for effectively improving the immunity of the piglets.