A novel hydrogel (DOP/PEI-PBA) based on the “three-component” reaction of 2-formylphenylboric acid (2-FPBA), the primary amine group of polyethyleneimine (PEI) and the cis-o-dihydroxy groups of Dioscorea opposita Thunb polysaccharide (DOP) was designed in this work. The hydrogel can be easily prepared by simply mixing the three reactants at room temperature. The hydrogel had dual responsiveness to glucose and pH, and can realize the controllable release of insulin. Moreover, the hydrogel combining insulin and DOP can inhibit the reactive oxygen species (ROS) level and malondialdehyde (MDA) content, and promote glucose consumption as well as the level of superoxide dismutase (SOD), in high-glucose-induced injury in HL-7702 cells, which reflects the synergistic effect of insulin and DOP to protect hepatocytes from oxidative stress at the same time. Further in vitro cytotoxicity studies showed that the hydrogel had good biocompatibility and no obvious toxicity to cells. These indicate that the prepared hydrogel (DOP/PEI-PBA) can be expected to be applied in the clinical treatment of insulin deficiency in diabetes.