-ATPase significantly enhances the effective translational diffusion of nanobots by 89%, accompanying the photophosphorylation for generating ATP. The photophosphorylation nanobots display cell-like adaptive positive phototaxis motion and a phototactic swarm. These programmable phototactic nanobots can actively target the heart, improve intracellular ATP concentration to restore cellular metabolism, and finally repair myocardial injury. Such self-propelled and maneuverable nanobots that can actively modulate cellular energy metabolism in vivo hold considerable promise for advancing the targeted regulation of diseases associated with bioenergy metabolism in the future.