The embedded system of an electromechanical device consists usually of electrical hardware and control software in order to control dedicated functions. In general, it is not easy to analyze abnormal behaviors of embedded systems, since it is too difficult to identify which component of hardware and which module of control software is creating the unforeseen behaviors. Failures in safety-critical embedded systems such as automatic braking system in cars and medical electrical equipment could lead to catastrophic consequences. Nevertheless, little attention has been given to systematic failure investigation for embedded systems. This paper therefore employs a simulation-based FMEA method to classify the root causes of failures and build a statistical fault tree. The proposed method is validated with the Ball-in-tube experiment.