Ulcerative colitis (UC) is a chronic and relapsing inflammatory intestinal disease. Although the morbidity of UC has increased notably in recent years, effective therapeutic treatment remains unsatisfactory. Astragaloside IV (ASI), a monomeric compound isolated from the traditional Chinese medicine herb Ligusticum chuanxiong, exhibits anti-inflammatory effects. The present study aimed to investigate the therapeutic effects of ASI on experimental UC in vitro and in vivo. Cell proliferation was detected via a Cell Counting Kit-8 assay in vitro. In addition, the concentrations of the inflammatory factors myeloperoxidase (MPO), tumor necrosis factor-α (TNF-α), interleukin-1β (IL-1β), interleukin-6 (IL-6) and nitric oxide (NO) in the colon tissues were determined by ELISA. Western blot analysis was used to examine phosphorylated transcription factor p65 (p-p65), p-inhibitor of NF-κB (IκB), claudin-1 and tight junction protein ZO-1 (ZO-1) protein levels in vitro and in vivo, respectively. The results indicated that lipopolysaccharide (LPS) significantly increased the pro-inflammatory cytokines TNF-α, IL-1β and IL-6 in CCD-18Co cells, which was markedly ameliorated by ASI. In addition to the inhibition of pro-inflammatory cytokines, ASI decreased the levels of p-p65 and p-IκB proteins. In addition, ASI decreased the disease activity index scores, and increased colon lengths in dextran sulfate sodium-induced UC mice. ASI also decreased the levels of the pro-inflammatory factors MPO, TNF-α, IL-1β, IL-6 and NO, and upregulated the expression of claudin-1 and ZO-1 in colon tissues. Therefore, ASI was effective in ameliorating experimental UC in vitro and in vivo via the inhibition of inflammatory molecules, and the downregulation of NF-κB signaling. In conclusion, ASI may serve as a potential therapeutic agent for the treatment of UC.