The invention discloses an allicin preparation for treating helicobacter pylori. The allicin preparation comprises the following components including allicin, rhizoma coptidis, folium syringae, mint leaves, herba taraxaci, radix scutellariae, malt, liquorice roots, poria, probiotics powder, radix codcnopsitis pilosulas and rhizoma dioscoreae. The allicin preparation has the beneficial effects that the preparation is prepared by compounding of the allicin, the rhizoma coptidis, the clove leaves, the mint leaves, the herba taraxaci, the radix scutellariae, the malt, the liquorice roots, the poria, the probiotics powder, the radix codcnopsitis pilosulas and the rhizoma dioscoreae, wherein the allicin has relatively high sensitivity to the helicobacter pylori and cannot cause drug resistance, so that the problem of drug resistance of the helicobacter pylori is solved; the malt has the effects of promoting gastrointestinal motility, helping digestion and resisting colitis, treating acute and chronic hepatitis and the like; the clove leaves have a certain inhibition effect on the helicobacter pylori; and the dandelion can inhibit propagation of the helicobacter pylori, has a certain effect on treatment of the helicobacter pylori, and therefore, the allicin preparation is safe and has no side effects, and has a good treatment effect on a patient with chronic gastritis; and the preparation method is simple to operate, and the efficacy and the extraction rate are high.