Patients with inflammatory bowel disease (IBD) experience abnormalities in the central nervous system via the gut-brain axis (GBA), leading to changes in brain structure and function. Butyrate has been shown to influence the central nervous system via the GBA, with potential benefits for neurological issues in IBD. However, directly assessing butyrate's impact on the central nervous system in IBD patients is difficult due to confounding factors in human studies. This study employed a mouse model to investigate the effects of sodium butyrate (NaB) on brain structure and function in IBD through multimodal MRI. Fifteen mice were equally divided into three groups: a healthy control group, an IBD group and an IBD + NaB group (NaB group). All three groups underwent scanning with a 9.4T magnetic resonance imaging scanner. The scanning sequences included diffusion tensor imaging (DTI), three-dimensional T2-weighted imaging and functional MRI (fMRI), respectively, to assess alterations in white matter integrity, grey matter nucleus volume and neural activity among the different groups. Compared with the IBD group, the NaB group exhibited reduced inflammation. In both the IBD and NaB groups, the mean diffusivity (MD) values of white matter fibre tracts in the left inferior cerebellar peduncle (restiform body) region were lower than those in the HC group. Differences in nucleus volume were observed among the groups in two regions: an undefined region and the left caudoputamen. Differences in neural activity were observed among the groups in the right pontine reticular nucleus, lateral posterior nucleus of the thalamus, left simple lobule and right midbrain reticular nucleus. Furthermore, alterations in neural local activity coherence were noted in the right nucleus accumbens, left intermediate reticular nucleus, and right hippocampal CA3 region. These results suggest that NaB alleviates the degree of inflammation in IBD mice and induces alterations in brain structure and function via the GBA.