Adhesions in the abdominal cavity are among the most common complications post abdominal surgery, resulting from excessive fibrous tissue proliferation and collagen synthesis due to various factors. To date, physical barrier materials have been approved for preventing adhesions, though their effectiveness remains unsatisfactory. One of the important causes of abdominal adhesions is the excessive proliferation of fibrotic cells, and our previous research indicated that STAT3 is a promising therapeutic target for anti-fibrosis. This study designed and synthesized a STAT3 targeted small molecule inhibitor compound 16 K and evaluated its anti-fibrotic effects using the CCK-8 assay on fibroblasts. Compound 16 K was then combined with GelMA (methacryloyl gelatin) hydrogel through UV curing to prepare StatGel, a 16 K-loaded hydrogel with both anti-fibrotic activity and physical barrier properties. Material property assessments showed that StatGel does not alter the inherent properties of GelMA while maintaining the capability of sustained release of compound 16 K. StatGel significantly inhibited the proliferation of L929 cells and TGF-β1-induced fibrotic differentiation, and down-regulated p-STAT3 protein without affecting the STAT3 protein. Furthermore, StatGel was demonstrated to prevent the formation of abdominal adhesions in a mouse model induced by CLP as assessed by histological examination and adhesion index. Overall, StatGel offers a potential approach for effectively preventing the formation of abdominal adhesions.