Mechanical bowel preparation (MBP) is essential for visualisation of the colon during colonoscopy. Previous studies have identified changes in gut microbiota composition after MBP and colonoscopy. Considering the gut microbiota is increasingly implicated in psychiatry, we explored the potential impact of this intervention on mood and the microbiota-gut-brain axis. We conducted a pre-post intervention study in adults, with timepoints of one week before and one month after MBP and colonoscopy. Our primary outcome was change in average Hospital Anxiety and Depression Scale depression sub-scores. We examined changes in average anxiety, stress, and quality of life scores and gut microbiota composition using 16S rRNA sequencing. We further explored associations between changes in depressive symptoms and gut microbiota and conducted post hoc analyses to explore potential effect modifiers. Average depressive symptom scores decreased one month post-procedure compared to baseline (n = 59; adjusted β = -0.64; 95%CI: -1.18, -0.11). Irritable bowel syndrome (IBS) appeared to moderate this relationship (β = 1.78; 95%CI: 0.292, 3.26); depressive symptoms increased in those with, and decreased in those without, IBS. Reduced alpha diversity, modest effects on beta-diversity, and increases in health-associated genera were observed one month post-procedure. Increases in the CLR-transformed abundances of Ruminococcaceae UCG-009 were associated with improvements in depressive symptoms. There is preliminary evidence of a potential mental health effect of MBP and colonoscopy, particularly for those with IBS, which may be associated with changes to the gut microbiota. Further research is required to confirm these findings and their clinical relevance.