The invention discloses a medicine for treating ascariasis and a preparation method of the medicine, and belongs to the field of traditional Chinese medicines. The medicine comprises the following effective components: stone-like omphalia, asiatic striga herb, lungwortlike lobaria herb, floating pondweed, ulmus macrocarpa hance, sargentgloryvine stem, garlic, caesalpinia sepiaria, dark plum, digenea simplex, phoenix eye nut, dwarf elm fruit jam, alchornea davidii franch, Chinese soapberry fruit, coptis chinensis and ferula asafetida. The medicines disclosed by the invention are appropriate in compatibility, are complemented with each other, and have the efficacies of detoxifying, killing insects, removing diseases, removing food retention, clearing away heat, drying dampness, purging fire for removing toxin, expelling parasite, relieving pain, warming the middle warmer, promoting qi circulation, harmonizing the stomach and helping digestion; a plurality of medicines can be combined directly to the diseased region; and the medicine has the advantages of fast acting, high recovery rate, no toxic or side effect, safty and convenience on symptoms such as worm accumulation abdominal pain, infantile dyspepsia, abnormal appetite, bruxism and nausea and vomiting caused by ascariasis, and is low in price and easy to prepare.