The invention relates to a formation flying spacecraft back-stepping sliding-mode control method, and belongs to the technical field of spacecraft posture adjustment. By the back-stepping sliding-modemethod, two distributed robust consistency tracking controllers are designed. The first robust controller can compensate known bounded external interface, is continuous and free from buffeting. In order to meet the use requirements of self-adaptive control, the second robust finite time controller does not need the upper bound of the known external interface. As the two controllers are designed based on a rotation matrix, attitude represented by the rotation matrix has global unique attribute, and the shortcoming of system unwinding can be overcome. By the aid of Lyapunov theorem, a whole closed-loop system is stable in finite time, simulation experiments prove that absolute attitude can be tracked, and formation member attitude consistency can be kept.