The invention discloses a medicament for hair or scalp, and a preparation method thereof. The medicament is prepared from the following components in parts by weight: 30-60 parts of yerbadetajo herb,15-30 parts of tuber fleeceflower root, 25-50 parts of folium mori, 10-35 parts of cacumen biotae, 25-50 parts of radix salviae miltiorrhizae, 10-55 parts of cedrol, 2.5-5 parts of pumpkin seed oil, 1-5 parts of folium artemisiae argyi, 3-8 parts of radix sophorae flavescentis, 1-4 parts of clove, 1.5-4 parts of lilac daphne flower bud and 2-8 parts of herba schizonepetae. The preparation method of the medicament for hair or scalp comprises the following steps: S1, preparing a liquid medicine a for later use, S2, preparing a liquid medicine b for later use, S3, preparing mixed powder c, and S4, preparing the medicament. Through the synergistic effect of various traditional Chinese medicines, head mites in the deep layer can be killed, hair follicles can be protected, the effects of killingmites, controlling oil and promoting hair regeneration are achieved, the effects of synchronously completing hair growing and nourishing, hair fixing and hair loss preventing, scalp cell and hair follicle repairing, pigment supplementing, oil controlling and dandruff removing are achieved, and the use performance of the shampoo is improved.