Specifical original problem of attitude controlling for spacecraft was proposed in this paper. Problem of optimal rotation from a known initial state in a prescribed spatial orientation was studied in detail (turnaround time is not fixed). Design of optimal program of reorientation is based on new indicator of quality that combines energy costs including the contribution of controlling torques and integral of rotary energy (in a known proportion) and reorientation time; presence of duration factor bounds time of rotation finish. To construct an optimal control of angular momentum changing, quaternionic method and the maximum principle were applied. Differential equation that relates spacecraft angular momentum and quaternion of spacecraft orientation is a base to obtain analytic solution to a problem. We reveal the properties of optimum control program analytically, and study key features of optimum motion in details. Also, we write the formalized equations, mathematical formulas to design optimal law for change of spacecraft’s angular momentum. Analytic relations and equations are given for finding the optimal solution. Control law (in as explicit dependence between phase variables and con-trolling variables has been formulated. Main relations determining optimum values of parameters for rotation control algorithm were given. The closed-form law for rotation was obtained for dynamically symmetric solids. Numerical example as well as results of mathematical modeling of spacecraft motion that formed using optimum control are presented. This data as addition to the made theoretic descriptions shows reorientation process (in virtual form) and demonstrates practical feasibility of the developed control method. A designed algorithm for optimal control of rotation improves an efficiency of attitude system, and originates more economical performing of space vehicle during its flight along orbit.