A generic modeling framework to infer the failure-spreading process based on failure times of individual nodes is proposed and tested in four simulation studies: one for cascading failures in interdependent power and transportation networks, one for influenza epidemics, one benchmark test case for congestion cascade in a transportation network, and one benchmark test case for cascading power outages. Four general failure-spreading mechanisms-external, temporal, spatial, and functional-are quantified to capture what drives the spreading of failures. With the failure time of each node given, the proposed methodology demonstrates remarkable capability of inferring the underlying general failure-spreading mechanisms and accurately reconstructing the failure-spreading process in all four simulation studies. The analysis of the two benchmark test cases also reveals the robustness of the proposed methodology: It is shown that a failure-spreading process embedded by specific failure-spreading mechanisms such as flow redistribution can be captured with low uncertainty by our model. The proposed methodology thereby presents a promising channel for providing a generally applicable framework for modeling, understanding, and controlling failure spreading in a variety of systems.