A closed-loop artificial pancreas controlled by body movements, which includes: a sensor used for detecting blood glucose concentration; an infusion module used for infusing drug into the body; a control module connected to the sensor and the infusion module, respectively; and a sensing module operatively connected to the control module and used to sense or recognize the user's body movements, and different body movements represent different functional instructions, and according to the body movement sensed or recognized by the sensing module, the control module controls the sensor or the infusion module to execute corresponding functional instructions, which enhances the user experience.