The article presents an algorithm for controlling a ground unmanned vehicle. The main task is to obtain a solution to control problems that allows you to transfer an unmanned vehicle from the initial position to a given final position at a certain time. Currently, autonomous vehicles are being actively introduced in all areas. Including in Russia, you can find unmanned trucks on the federal highway. Given the development of microprocessor technology and the significant economic benefits of using unmanned vehicles, this task is relevant. A lot of research in the field of control of unmanned vehicles concerns the issue of their use in urban environments and on rough terrain. In this paper, we present a solution to the problem of optimal control of an unmanned vehicle using the maximum principle. The problem of optimal control is solved in a deterministic setting with an integro-terminal criterion. The solution of the two-point boundary value problem arising from the maximum principle was carried out using Newton’s method. The ranges of initial values of conjugate variables are obtained, which ensure the convergence of calculations. For the chosen mathematical model of the course movement of the car, solutions to the problem were obtained. The results of numerical simulation are presented, showing the possibility of using the proposed algorithm to control an unmanned vehicle under various initial and final conditions. The developed algorithm has been successfully applied in the presence of a penalty zone. The algorithm can be used when applying the concept of " flexible trajectories" in the tasks of controlling moving objects.