Inflammatory bowel disease, an intestinal relapsing inflammatory disease, not only impairs gastrointestinal function but also increases the chances of developing colon cancer. Currently, the effects of shrimp peptide (SP) in mice model of ulcerative colitis (UC) are still unclear. In particular, it is uncertain whether SP affects the gut flora with UC mice. In this study, we investigated the anti-inflammatory effects of SP on a dextran sulfate sodium (DSS)-induced mouse model of UC. Firstly, the molecular weight of SP was mainly distributed in the range of 180–1,000 Da (61.95% proportion), and the amino acid composition showed that SP contained 17 amino acids, of which, the essential amino acids accounted for 54.50%. In vivo, oral SP significantly attenuated the severity of colitis, such as diarrhea, weight loss, and rectal bleeding. Furthermore, treatment with SP remarkably ameliorated intestinal barrier integrity, thus lowering the levels of the inflammatory cytokines and ameliorating antioxidant indices and intestinal injury indicators in the serum and colon. Lastly, the cecal contents were used to sequence and analyze the 16S rRNA genes of bacteria. Results suggested that treatment with SP could restore the balance of intestinal flora in modeled mice by regulating the abundance of pathogenic and beneficial bacteria. Furthermore, SP could significantly improve intestinal flora dysfunction in mice with UC. In summary, our findings show that SP has a prophylactic and therapeutic effect in UC in vivo, thereby highlighting its broad medicinal applications.