The invention discloses a feed with the effect of enhancing the immunity and resistance of livestock. The feed is prepared from the following raw materials: maize, wheat, rice bran meal, soybean meal, rapeseed meal, peanut meal, cottonseed meal, palm kernel meal, bran, cassava powder, maize alcohol lees, fish powder, plasma protein powder, salt, cane sugar, calcium hydrophosphate, natural betaine, methionine, threonine, lysine, isoleucine, modified attapulgite powder, a trace element premix, a vitamin premix and a feed additive, wherein a preparation method of the modified attapulgite powder comprises the following steps: dissolving chitosan in an organic acid solution, then adding attapulgite, reacting, carrying out filter pressing, calcining, grinding and sieving, adding garlic essential oil, zingiberol, mannan oligosaccharides, berberine and a complex enzyme preparation and mixing the materials uniformly, thus obtaining the modified attapulgite powder. The feed with the effect of enhancing the immunity and resistance of livestock has the effect of enhancing the body immunity and resistance of livestock, can achieve the effect of improving the gastrointestinal functions and does not have drug residues.