The invention provides pig feed for preventing and treating piglet diarrhea and a preparation method thereof. The feed is prepared from the following raw materials in parts by weight: 20-40 parts of corns, 10-20 parts of extruded soybeans, 10-20 parts of bran, 5-10 parts of hyacinth beans, 2-5 parts of vegetable oil, 5-10 parts of calcium hydrogen phosphate, 5-8 parts of talcum powder, 1-2 parts of table salt and 2-3 parts of traditional Chinese medicine additive; and the traditional Chinese medicine additive includes the following raw drugs: honeysuckles, purslane, dandelion, root of Chinese pulsatilla, golden cypress, ash bark, jasmine, medicine terminalia fruits, smoked plums, astragalus membranaceus, angelica sinensis, rhizome of swordlike atractylodes, white atractylodes rhizome and agastache rugosus. With the adoption of the feed provided by the invention, the balance of microbial flora of gastrointestinal tracts of piglets can be comprehensively regulated, antisepsis and anti-inflammation can be realized, and diarrhea can be realized in a short period; the pig feed has the effects of tonifying qi and blood, tonifying spleen and tonifying stomach and effectively improving the immunity of the piglets, so that the aim of treating both manifestation and root cause of diseases is realized; and meanwhile, the feed has high nutritional value and good palatability, and the food intake of the piglets can be effectively improved.