Ulcerative colitis (UC) is a chronic inflammatory intestinal disease characterized by an imbalance in immune function and the overexpression of inflammatory cytokines and mediators. Vitamin B2, also known as riboflavin (Libof), is an essential water-soluble vitamin with numerous beneficial properties, including antioxidant, anti-aging, anti-inflammatory, antinociceptive, and anti-cancer effects. In this study, we aimed to investigate the protective effects of Libof on dextran sulfate sodium (DSS)-induced experimental colitis. The C57BL/6 mice were used as the in vivo model of chronic colitis to investigate the anti-inflammatory effects of Libof. RAW 264.7 cells were used for the in vitro investigation of the molecular mechanisms underlying these effects. In vivo, Libof alleviated the DSS-induced disease activity index (DAI), colon length shortening, and colonic pathological damage. In vitro, Libof inhibited lipopolysaccharide (LPS)-induced tumor necrosis factor (TNF)-alpha and interleukin (IL)-6 production in RAW 264.7 cells. Moreover, Libof inhibited LPS-induced nitric oxide (NO) production and inducible nitric oxide synthase (iNOS) expression in RAW 264.7 cells. In conclusion, these findings indicate that Libof shows potential as an agent for the treatment of UC.