The invention provides a composition for treating beriberi and onychomycosis and a preparation method thereof, which relate to the technical field of traditional Chinese medicines. The composition for treating beriberi and onychomycosis comprises the following raw materials: notopterygium root, elecampane, polygala tenuifolia, safflower, bighead atractylodes rhizome, ligusticum wallichii, codonopsis pilosula, semen cuscutae, radix angelicae pubescentis, angelica sinensis, ginseng, gastrodia elata, vernonia gratifolia, caulis spatholobi, centella asiatica, grape seed oil, sweet almond oil and ginger root oil. Based on the principle of clearing heat and eliminating dampness, nourishing blood and moistening dryness, dredging meridians and dredging collaterals, through research by the inventor, notopterygium root, safflower, bighead atractylodes rhizome and radix angelicae pubescentis are used as monarch drugs, elecampane, polygala tenuifolia, ligusticum wallichii, codonopsis pilosula, semen cuscutae, angelica sinensis, ginseng, gastrodia elata, vernonia gratifolia, ginger root oil, caulis spatholobi and centella asiatica are used as auxiliary materials, the effects of removing dampness, diminishing swelling, activating blood to promote menstruation, eliminating dampness, inducing diuresis and activating blood to promote menstruation can be achieved on foot focuses, and grape seed oil and sweet almond oil have the moisturizing and synergistic effects.