This paper presents an optimal control method based on control effort minimization for a legless piezo capsubot. The capsubot is an underactuated nonlinear dynamics system which is driven by an internal impact force and friction. Here, the motion mechanism of the capsubot is divided into two stages. In the rst stage, the aim is to design an optimal controller minimizing energy consumption. In the second stage, optimization is not an objective and instead a four-step strategy for inner mass of the capsubot is proposed. Then, based on the proposed motion strategy, a trajectory prole is given. Using this trajectory prole, the capsubot moves in the desired direction. To evaluate the performance of the proposed control scheme, a comparative study has been performed by means of simulation. Simulation results show that the proposed approach is promising as compared to the Open-Loop Control (OLC) approach and Close-Loop control (CLC) approach which are widely used in the literature for control of capsubots.