Ulcerative colitis (UC) is a chronic, non-specific inflammatory disease of the intestine with an unknown etiology. The primary clinical manifestations include recurrent abdominal pain, diarrhea, mucus and purulent discharge, bloody stools, and tenesmus. Experts generally agree that the onset of this disease is primarily associated with factors such as intestinal flora, dietary composition, genetics, immunity, infections, and systemic inflammation. The intestinal flora constitutes the largest microecological system within the human body, consisting of a vast array of microorganisms that interact dynamically with the immune cells located in the intestinal wall. This interaction is crucial for maintaining a balance with the intestinal mucosa. The intestinal flora plays a significant role in the development of the immune system, sustaining normal immune function, and cooperatively countering the invasion of pathogenic bacteria. Alterations in the composition of the intestinal flora can influence the equilibrium between intestinal tolerance and immunity. Research has demonstrated that the disease process in UC patients is closely linked to disturbances in the structure of the intestinal bacterial flora,and symptoms can be significantly alleviated following the transplantation of normal flora. Therefore,Modulating the structure of the intestinal microbiota may serve as an effective strategy for treating ulcerative colitis (UC). This article examines the relationship between intestinal flora and intestinal wall immunity in the context of UC, while also exploring novel approaches for its treatment.