The invention provides a pharmaceutical composition for the treatment of nutritional anemia of piglets and a preparation method thereof. The pharmaceutical composition is prepared from the following raw materials: radix glycyrrhizae, poria with hostwood, polygala tenuifolia, semen ziziphi spinosae, radix aucklandiae, arillus longan, fructus jujubae, scrap iron, lodestone, fructus mume, fructus schisandrae, silkworm chrysalis, porphyra, tortoise shell, carapax trionycis, blighted wheat, cuttlebone, citron fruit, semen juglandis, pine seed, endothelium corneum gigeriae galli, radix rehmanniae preparata, prepared polygonum multiflorum, donkey-hide gelatin, amomum villosum, ventilago leiocarpa, wilson begonia rhizome, atractylodes macrocephala koidz, ginseng, astragalus, angelica sinensis, surname, and smilax riparia. The pharmaceutical composition provided by the invention is used for treating nutritional anemia of piglets, has the effects of benefiting qi and nourishing blood, strengthening the spleen in transportation, tonifying kidney-essence and producing medulla, and can be used for enhancing the resistivity; and the pharmaceutical composition has the advantages and characteristics of less work and more benefit, accurate drug selection, high quality, low cost, safety, applicability, no drug residues, and the like in the aspect of treating nutritional anemia of piglets.