In view of the design characteristics and difficulties of Change-5 flight program, such as multi-cabin, multi-target and complex system control, the traditional flight program design method is difficult to meet the mission requirements due to its heavy workload and difficult state control. In this paper, a new method based on state transition was proposed for system modelingof flight program. The whole flight process was firstly decomposed into several module state machines, then each module state machine was divided into state generator, state assessor, command executor and state verifier according to their functions, and modeling design was carried out respectively. Finally, each function module was connected by state generator and state verifier to form the finite state machine description of the whole flight program. Compared with traditional methods, this method has the characteristics of generality, extensibility, reusability, and has great advantages in standardizing flight program design and describing complex flight mission process.The flight program of Change-5 was modeled and designed by using this method, and the design results of typical flight process were given. The in-orbit flight test results show that this method can meet the requirements of the mission and ensure the successful in-orbit flight control of Change-5 mission.