The invention discloses an external drug for treating insomnia. The external pharmaceutical is packaged by a drug bag, and comprises radix codonopsitis 1.5-7.5g, largehead atractylodes 1-5g, milk vetch 1.5-7.5g, best poria 1.5-7.5g, polygala root 1-5g, spine data seed 2-10g, angelica 1-5g, costus root 1-5g, vermilion 0.5-2.5g, magnet 2-10g, six medicated leaven1.5-7.5g, tuber fleeceflower stem 1.5-7.5g, albizia bark 1.5-7.5g, dragon bone 2-10g, oyster 2-10g, schisandra fruit 1-5g, eucommia bark 1.5-7.5g, bugbane rhizome 1-5g, and licorice 1-5g. The preparation method includes pulverizing the materials into powder; and packaging in a drug bag made of fabric. The external drug has the advantages of no toxic and side effect, low cost, remarkable therapeutic effect, convenient application and no damage, allergy and irritation to skin, and caused no drug dependency of patients.