The attitude synchronization tracking problem for spacecraft formation flying is investigated in this paper based on sliding-mode control and a Chebyshev neural network (ChNN). A distributed attitude cooperative controller is designed for a group of spacecrafts to guarantee that each individual spacecraft will track the reference attitude of the virtual leader in the presence of external disturbances, system uncertainties and input saturation. An adaptive ChNN is introduced to approximate the system nonlinear uncertainties and bounded external disturbances online, and a switch function, which acts as a switching signal between the adaptive ChNN controller and the robust control law, is applied to limit the output of the ChNN approximator. Then, utilizing Nussbaum-type functions, an auxiliary control system is designed to counteract the nonlinearities caused by input saturation. Finally, a numerical simulation example is provided to illustrate the robustness and effectiveness of the proposed attitude control scheme.