Various injectable glucose-responsive insulin release systems, including microspheres, have been developed to achieve insulin release for over a day. However, a major challenge is on-demand release insulin, which is closely related to the degradation rate of the delivery vehicle. Herein, chitosan-based three-compartment microspheres (TCMs) were fabricated using gas-shearing microfluidics. Glucose reacts with glucose oxidase (GOD) to generate gluconic acid, and chitosan degrades under acidic conditions to release insulin. The chitosan concentration in each compartment is adjusted to have gradient pH response ranges. Low, medium and high concentrations of insulin are encapsulated in low, medium and high concentration chitosan compartments respectively. The number of compartments involved in insulin release increases from one to three as blood glucose rises. Compared with single one-compartment microspheres (OCMs), TCMs maintain structural integrity and drug action for a longer duration. In vitro experiments have proven the on-demand release of insulin and excellent biocompatibility of TCMs. In chemically induced type 2 diabetes cell models, TCMs demonstrated long-term regulation of blood glucose levels for 20 to 35 h. This work presents a novel concept of constructing three compartments in microspheres to release insulin on-demand, and is highly attractive for research on insulin analogs and other related application.