This paper investigates the problem of rotation matrix-based attitude synchronization and tracking control for spacecraft formation flying exposed to external disturbance and unknown inertial matrix. For the purpose of ensuring finite-time convergence for attitude tracking errors, a hyperbolic tangent function-based sliding mode surface is designed. Based on the sliding mode variable, an adaptive law is proposed to estimate the upper bound of unknown disturbance and radial basis function is employed to approximate unknown system dynamics. The minimum learning parameter algorithm is adopted to reduce the computational burden. It is demonstrated by Lyapunov-based analysis that the sliding mode surface and estimating errors will possess finite-time stability under the presented controller. Finally, results of numerical simulations are exhibited to validate the stability and validity of the proposed controller. INDEX TERMS rotation matrix, finite-time coordinate control, spacecraft formation flying, sliding mode, neural network