Nowadays, the engineering system is becoming increasingly complex. There are many expected and unexpected function interactions existing between the components, which puts forward higher requirements for safety work. Aiming at the limitations of the traditional safety analysis methods, this paper proposes a fault propagation modeling method based on stateflow. The fault propagation process in the system can be seen as a process in which a series of discrete event trigger in succession. We use stateflow, a software based on the theory of the finite state machine to construct the system model to describe the process and carry out simulation analysis on the model. Finally, a case study is provided to verify the effectiveness and feasibility of this approach.