Gastric retention hydrogels represent a potential material with weight-loss effects and offer an effective solution to address the low bioavailability of drugs in pharmaceutical therapy. This study aims to develop a degradable hydrogel capable of prolonged retention in the stomach, facilitating both weight loss and drug release. Two degradable macromolecular crosslinking agents were synthesized, with acrylamide as the main monomer, mixed with chitosan solution for the preparation of a degradable hydrogel with a semi-interpenetrating network (sIPN) structure initiated by a redox initiator. The morphology and chemical structure of the prepared hydrogels were characterized using analytical techniques such as SEM and FTIR. In vitro drug release experiments demonstrated that the hydrogel achieved controlled drug release, extending the drug's retention time in the stomach. The swelling performance, biocompatibility and degradation properties of the hydrogel in simulated gastric fluid (SGF) were also evaluated. Results indicated that the hydrogel with crosslinking agent ratio 4:6 exhibited a swelling ratio of 2700%, excellent biocompatibility and a weight loss of 7% in SGF over 5 days. The 4:6 hydrogel had a compressive modulus greater than 13 kPa at 60% deformation, demonstrating resistance to gastric peristalsis. Therefore, the chitosan sIPN hydrogel holds promising potential for applications in weight loss and the treatment of gastric diseases.