The invention discloses the application of a strain of Lactobacillus rhamnosus in preventing and relieving ulcerative colitis, and belongs to the technical field of functional microorganisms. Lactobacillus rhamnosus can tolerate the human gastrointestinal environment, significantly reduce weight loss during ulcerative colitis, improve stool texture and blood in the stool, improve colonic mucosal damage, reduce MPO activity, and reduce the pro-inflammatory factor TNF-α in the colon , IL-1β, IL-6, IFN-γ content, up-regulate the transcription levels of colon tight junction-related proteins Claudin-3, ZO-1, ZO-2 and Occludin, antimicrobial peptides Reg3g, Reg3b and mucin MUC2, increase the transcription level of short chain The abundance of fatty acid-producing bacteria Coprococcus, Faecalibacterium and the content of short-chain fatty acids increased the abundance of beneficial bacteria Lactobacillus and decreased the abundance of opportunistic pathogen Acinetobacter, increasing the richness and diversity of intestinal flora.