Oxidative stress is proposed as a regulatory element in various neurological disorders, which is involved in the progress of several neurodegenerative diseases such as Alzheimer's disease (AD) and Parkinson's disease (PD). Antioxidant drugs are widely used to alleviate neurodegenerative disorders. Astragalus membranaceus (Huangqi, AM) is a commonly used medicinal herb with a wide range of pharmacological effects. Here, the protective effect and mechanism of AM extract (AME) and its bioactive compounds against neurodegenerative disorders via alleviating oxidative stress were detected using adult Drosophila melanogaster. The drug safety was measured by development analysis; oxidative stress resistance ability was detected by survival rate under H2O2 environment; ROS level was detected by DHE staining and gstD1-GFP fluoresence assay; antioxidative abilitiy was represent by measuring antioxidant enzyme activity, antioxidative-related gene expression, and ATP and MFN2 levels. The neuroprotective effect was evaluated by lifespan and locomotion analysis in Aβ42 transgenic and Pink1B9 mutants. AME dramatically increased the survival rates, improved the CAT activity, restored the decreased mRNA expressions of Sod1, Cat, and CncC under H2O2 stimulation, and ameliorated the neurobehavioral defects of the AD and PD. Thirteen small molecules in AM had antioxidant function, in which vanillic acid and daidzein had the most potent antioxidant effect. Vanillic acid and daidzein could increase the activities of SOD and CAT, GSH level, and the expressions of antioxidant genes. Vanillic acid could improve the levels of ATP and MFN2, and mRNA expressions of ND42 and SDHC to rescue mitochondrial dysfunction. Furthermore, vanillic acid ameliorated neurobehavioral defects of PD. Daidzein ameliorated neurobehavioral defect of Aβ-induced AD mode. Taken together, AM plays a protective role in oxidative damage, thereby as a potential natural drug to treat neurodegenerative disorders.