Aims/Background The pathogenesis of irritable bowel syndrome encompasses various factors, including abnormal gastrointestinal motility, heightened visceral sensitivity, dysfunction in the brain-gut axis, psychological influences, and disturbances in the intestinal flora. These factors manifest primarily as persistent or intermittent abdominal pain, diarrhoea, alterations in bowel habits, or changes in stool characteristics. In our investigation, we delve into the repercussions of mechanical barrier damage and immune dysfunction on symptoms among patients with post-infectious irritable bowel syndrome. Methods This study recruited a total of 20 healthy controls and 49 patients diagnosed with irritable bowel syndrome. Among the irritable bowel syndrome patients, we categorised them into two groups based on the ROME IV diagnostic criteria: the post-infectious irritable bowel syndrome group (n=23) and the non-post-infectious irritable bowel syndrome group (n=26). To compare clinical features, we utilised the Gastrointestinal Symptom Rating Scale, Self-Rating Depression Scale, and Self-Rating Anxiety Scale. Furthermore, we employed various techniques including haematoxylin and eosin (HE) staining, electron microscopy, Enzyme-linked Immunosorbent Assay, and flow cytometry to assess changes in immune cells, immune factors, inflammatory biomarkers, and intestinal barrier function. Results Under haematoxylin and eosin staining, post-infectious irritable bowel syndrome patients demonstrated increased neutrophils and plasma cells compared to the control group. Additionally, electron microscopy revealed ultrastructural changes such as the widening of the epithelial cell gap in the intestinal mucosa among post-infectious irritable bowel syndrome patients. Comparatively, the Gastrointestinal Symptom Rating Scale, Self-Rating Anxiety Scale, and Self-Rating Depression Scale scores were significantly elevated in the post-infectious irritable bowel syndrome group in contrast to both the control group and the non- post-infectious irritable bowel syndrome group (p < 0.05). Moreover, post-infectious irritable bowel syndrome patients exhibited a notably higher neutrophil-to-lymphocyte ratio compared to the control group (p < 0.05). Furthermore, the levels of interleukin-17 (IL-17) were elevated in post-infectious irritable bowel syndrome patients compared to the control group (p < 0.05). Additionally, the post-infectious irritable bowel syndrome group displayed a higher percentage of T helper 17 (Th17) cells compared to both the control and non-post-infectious irritable bowel syndrome groups (p < 0.05). Conclusion Acute gastrointestinal infection can disrupt the balance of intestinal flora, leading to dysbiosis. This dysbiosis can trigger the release of pro-inflammatory factors, including interleukin-17, which contributes to the impairment of the intestinal mucosal barrier. Consequently, this sets the stage for the development of long-lasting, mild chronic intestinal inflammation, ultimately culminating in the onset of post-infectious irritable bowel syndrome. Furthermore, within the framework of the gut-brain axis interaction, anxiety and depression may exacerbate intestinal inflammation in post-infectious irritable bowel syndrome patients. This interaction can perpetuate and prolong clinical symptoms in individuals with post-infectious irritable bowel syndrome, further complicating the management of the condition.