To investigate the repair mechanism of umbilical cord mesenchymal stem cells (UC-MSCs) in hydrogel on pancreatic β-cells in diabetes, MIN-6 damaged by streptozotocin (STZ) in vitro was used in co-culture with UC-MSCs in hydrogel (UC-MSCs + hydrogel). It was found that UC-MSCs + hydrogel had a significant repair effect on injured MIN-6 cells, which was better than the use of UC-MSCs alone (without hydrogel). After repair, the expression of superoxide dismutase (SOD) and catalase (CAT) as well as the total antioxidant capacity (T-AOC) of the repaired MIN-6 cells were increased, effectively reducing the oxidative stress caused by STZ. In addition, UC-MSCs + hydrogel were able to curb the inflammatory response by promoting the expression of anti-inflammatory factor IL-10 and reducing inflammatory factor IL-1β. In addition, the expression of both nuclear antigen Ki67 for cell proliferation and insulin-related genes such as Pdx1 and MafA was increased in the repaired MIN-6 cells by UC-MSCs + hydrogel, suggesting that the repair effect promotes the proliferation of the injured MIN-6 cells. Compared with the use of UC-MSCs alone, UC-MSCs + hydrogel exhibited longer survival time of UC-MSCs, because the porous structure and hydrophilic properties of the hydrogel could affect the growth of cells and slow down their metabolic activities, resulting in a better repair effect on the injured MIN-6 cells.