The invention discloses a traditional Chinese medicine formula for preventing and treating alopecia. The traditional Chinese medicine formula is characterized by comprising the following components in parts by weight: 4-7 parts of ginseng, 1-2 parts of radix sophorae flavescentis, 10-18 parts of zingiber kawagoii hayata, 15-20 parts of cacumen platycladi, 2-5 parts of dried ginger, 3-7 parts of polygonum multiflorum, 1-4 parts of prickly ash, 1-3 parts of radix astragali, 3-8 parts of glossy privet fruit, 9-15 parts of angelica sinensis, 1-5 parts of polyporus umbellatus, 7-13 parts of propylene glycol, 3-6 parts of aldehyde-removed ethanol, 8-11 parts of 1,3-butanediol, 1-2 parts of water-soluble azone and 7-9 parts of water. In the invention, by adjusting the proportion of alcohol and water and adopting the water-soluble azone, active ingredients of the water-soluble azone are effectively extracted and directly reach hair follicle for administration, thus the nutrition supply of the hair follicle is enhanced, the parasitic harmful bacteria and fungi in the hair follicle are inhibited and even killed, and new hair grows while the alopecia is prevented and treated.