Stress-induced hyperglycaemia (SHG) can be observed in as high as 75% of critically ill patients, which can induce severe complications or adverse events. However, conventional intensive insulin therapy (CIIT) tends to induce hypoglycaemia and glucose variability. This study investigated the clinical effects of a blood glycaemic control optimization programme (BGCOP) in patients with stress hyperglycaemia post hepatobiliary or pancreatic surgery. This study is a randomized, controlled, prospective clinical observation. Eighty-six patients with postoperative SHG were randomly divided into a control and experimental groups. Participants in the control group underwent CIIT, while participants in the experimental group underwent blood glycaemic control optimization programme (BGCOP). A range of 7·8-10·0 mmol/L was designated as the target range for effective control of blood sugar. The validity index, adverse events and complications were compared between two groups. Compared to participants treated with CIIT, participants treated with BGCOP reached the target range of blood sugar levels more quickly (p = 0·000). The high glycaemic index (p = 0·000), incidence of hypoglycaemia (p = 0·011), and other adverse events as well as the incidence of abdominal infection (p = 0·026), incision infection (p = 0·044), and lung infection (p = 0·047) were significantly lower in participants who underwent the BGCOP than in patients treated with CIIT. BGCOP can more effectively control blood sugar levels compared with CIIT in patients with SHG after hepatobiliary or pancreatic surgery. This study provides a direction for blood glycaemic control in patients with stress hyperglycaemia post hepatobiliary or pancreatic surgery.