Background and objectives: The seeds of Sophora alopecuroides L. var. alopecuroides may benefit treatment of opioid dependence. Therefore, the plant alkaloid composition, toxicity and effects on morphine withdrawal were studied. Methods: The alkaloid composition was determined by GC and GC/MS analysis. Mice were made dependent by morphine injected 3 times a day for 3 days. The withdrawal jumping and diarrhea were induced by administration of naloxone 2 h after the 10th injection of morphine on the day 4. The ethanol 90% extract (100, 200, 300 mg/kg), alkaloid fraction (5, 10, 20 mg/kg), morphine (50 mg/kg) or saline were injected 30 min before naloxone. All drugs were injected subcutaneously to groups each consisting of 10 mice. To assess toxicity, different doses of the ethanol or aqueous extracts dissolved in normal saline were gavaged once to groups each consisting of 30 mice. Afterward, the numbers of dead animals within 72 h after gavage were counted and LD50 was calculated. Results: Matrine, cytisine, sophoridine, n-methyl cytisine, sophocarpine and sophoramine were the major alkaloids. All doses of the total extract, alkaloid fraction and morphine decreased jumping and diarrhea significantly compared to the saline (p0.05). The ethanol and aqueous extracts LD50 were 355 mg/kg and 540 mg/kg, respectively. Conclusion: The plant inhibited opioid withdrawal with efficacy comparable to morphine. The alkaloids may be involved in the effect. The ethanol and aqueous extracts are moderately and slightly orally toxic, respectively.