The mathematical statement of the problem of energy-optimal control for a bipedal locomotion system is given. The proposed statement of the problem is characterized by broad utilization of experimental data of normal human locomotion. It is done mainly by means of the mathematical formulation of the constraints imposed both on the phase coordinates and on the controlling stimuli of a system. A numerical method for the solution of the optimal control problems for highly nonlinear and complex bipedal locomotion systems is proposed. The method is based on a special procedure of converting the initial optimal control problem into a standard nonlinear programming problem. This is made by an approximation of the independent variable functions using smoothing cubic splines and by the solution of an inverse dynamics problem. The key features of the method are its high numerical effectiveness and the possibility to satisfy a lot of restrictions imposed on the phase coordinates of the system automatically and accurately. The proposed method is illustrated by computer simulation of the energy-optimal anthropomorphic motion of the bipedal walking robot over a horizontal surface.