The invention provides a spacecraft dynamics modeling method. The method comprises the following steps of: replacing a liquid sloshing equivalent mechanical model with an equivalent pendulum, enabling a closed loop topology structure to be equivalent to an open loop tree topology structure, defining a coordinate system at a hinge joint, defining a basic contact operator, characterizing elastic displacement of a flexible body, and performing recurrent calculation on the force and speed of the flexible body; and judging whether systematic calculation on a dynamics model is a forward dynamics modeling process or a backward dynamics modeling process, correspondingly substituting the forward dynamics modeling process or the backward dynamics modeling process, and deducing a system dynamics equation. The method provided by the invention is capable of not only meeting the precise modeling requirement, but also simplifying the design process, saving a lot of workload, accelerating the spacecraft development period, realizing high-precision high-efficiency dynamics modeling of a large flexible cable antenna spacecraft, achieving modeling of a flexible multi-body system capable of calculating closed loop spacecraft configuration in a simplest mode, and saving a lot of tedious and hard works.