Peritoneal fibrosis (PF) is a common complication in peritoneal dialysis patients with end-stage renal disease. This study established a rat model of PF, used 68Ga-FAPI PET/CT imaging to visualize PF, and evaluated the therapeutic effects and mechanism of action of sodium butyrate. The rat model of PF (n = 20) was induced by hyperglycemic peritoneal dialysate combined with lipopolysaccharide, the control group (n = 20) was given the same amount of normal saline, and the intervention group (n = 20) was given sodium butyrate by intraperitoneal injection. At 2, 4, 6, and 8 weeks, a peritoneal equilibration test was performed, and peritoneal tissues were collected for histological staining. Three rats from each group were randomly selected for 68Ga-FAPI small animal PET/CT imaging. Compared with control rats, model group rats presented a decreased ultrafiltration volume, increased maximum glucose transport (P < 0.05), increased peritoneal thickness and fibrosis area, and upregulated α-SMA, COL I, TGF-β1, Smad3, and p-Smad3 expression in peritoneal tissues (P < 0.05) in a time-dependent manner. The sodium butyrate group improved peritoneal transport function (P < 0.05), alleviated collagen deposition, and downregulated α-SMA, COL I, TGF-β1, Smad3, and p-Smad3 while increasing Smad7 expression in peritoneal tissues (P < 0.05). 68Ga uptake was markedly increased in the model group (P < 0.05) but was reduced after sodium butyrate treatment (P < 0.05). The SUVmax was positively correlated with peritoneal thickness; maximum glucose transport; and α-SMA, COL I, and FAP-α expression (r = 0.871, 0.845, 0.843, 0.659, 0.926) but negatively correlated with ultrafiltration volume (r= -0.894). In summary, 68Ga-FAPI PET/CT could be a promising noninvasive approach for assessing peritoneal fibrosis that is superior to and safer than peritoneal biopsy. Sodium butyrate may attenuate peritoneal fibrosis by regulating the TGF-β1/Smad3 signaling pathway.