The invention discloses a shampoo for preventing hair loss and a preparation method thereof. The shampoo includes active ingredients, including salvia miltiorrhiza extract, angelica extract, safflower extract, astragalus extract, Polygonum multiflorum extract, and camellia seed polypeptide. The active ingredient composed of the salvia miltiorrhiza extract, the angelica extract, the safflower extract, the astragalus extract, the Polygonum multiflorum extract and the camellia seed polypeptide can enhance the activity of the dermal papilla cells after being treated with dihydrotestosterone. In vitro experiments showed that the secretion factors of dermal papilla cells, such as IGF‑1, VEGF, DKK‑1, TGFβ1, TGFβ2, IL‑6, etc., as well as β‑catenin and AR, all returned to normal levels. Patients with alopecia and thinning hair use the shampoo of the present invention once every 3 days. The effective rate is 85% for patients with hair loss and 98% for patients with thinning hair.