Inflammatory bowel disease (IBD) is characterized by chronic and relapsing intestinal inflammation, which currently lacks safe and effective medicines. Astragalus membranaceus (AM), also named Huangqi, is one of the most commonly used fundamental herbs in China. Here, we aimed to investigate mechanism and bioactive compounds of AM on treating sodium dodecyl sulfate (SDS)- induced colitis in Drosophila flies. Our data showed that AM extract (AME) supplementation had no toxic effect in flies, and protected flies against SDS-induced lifespan shortening, intestinal morphological damage, and colon length shortening. Moreover, AME supplementation remarkably rescued SDS-induced intestinal stem cell (ISC) overproliferation and increased reactive oxygen species (ROS) level in the intestine. Mechanistically, AME remarkably rescued the altered expression levels of genes and proteins in c-Jun N-terminal kinase (JNK) and JAK-STAT signaling pathways induced by SDS in gut. Additionally, formononetin, isoliquiritigenin, isorhamnetin, astragaloside I, astragaloside III, vanillic acid, and caffeic acid in AM had protection against SDS-induced inflammatory damage in flies. Taken together, AME could ameliorate the intestinal inflammation partially by suppressing oxidative stress-associated JNK signaling and JAK-STAT signaling pathways. AME may provide a theoretical basis for natural medicine toward treating intestinal inflammatory disease in human.