Advances in bioinspired design principles and nanomaterials have led to tremendous progress in autonomously moving synthetic nano/micromotors with diverse functionalities in different environments. However, a significant gap remains in moving nano/micromotors from test tubes to living organisms for treating diseases with high efficacy. Here we present the first, to our knowledge, in vivo therapeutic micromotors application for active drug delivery to treat gastric bacterial infection in a mouse model using clarithromycin as a model antibiotic and Helicobacter pylori infection as a model disease. The propulsion of drug-loaded magnesium micromotors in gastric media enables effective antibiotic delivery, leading to significant bacteria burden reduction in the mouse stomach compared with passive drug carriers, with no apparent toxicity. Moreover, while the drug-loaded micromotors reach similar therapeutic efficacy as the positive control of free drug plus proton pump inhibitor, the micromotors can function without proton pump inhibitors because of their built-in proton depletion function associated with their locomotion.