Diabetes is a chronic metabolic disease when the pancreas cannot produce insulin or when the body cannot use the insulin it produces to maintain glucose balance in humans. The World Health Organization (WHO) statistics reveal that the number of diabetic patients worldwide is around 400 million. Developing a miniaturized, low-cost and smart closed-loop system for diabetes could significantly improve life quality and benefit millions of people. Conventional closed-loop devices are large in size and exorbitant. In this talk, I will present our recent studies about electrically-controlled flexible closed-loop patch for continuous diabetes management. Hollow microstructures were fabricated, and the outer layer of was functionalized to serve as a biosensing device for the in-situ sensitive and accurate monitoring of interstitial glucose. The inner layer was integrated with a flexible miniaturized pump to deliver insulin, and the delivery rate was electrically controlled by the glucose level from the biosensing device. The closed-loop system successfully stabilized the blood glucose levels of diabetic rats in a normal and safe range. The system is painless, miniaturized, cost-effective, and flexible. It is anticipated that it could open up exciting new avenues for fundamental studies of new closed-loop devices as well as practical applications for diabetes management.