A robust and efficient computational method to solve the dynamic interaction of a high-speed train and railway structure including derailment during an earthquake is given. Mechanical models to express contact–impact behaviors during and after derailment are described. A modal reduction has been developed to solve nonlinear equations of motions of the train and railway structure effectively. The exact time integration in the modal coordinate is given that is free from the round-off error normally appeared in the numerical time integration for very small time increments to solve the interaction including derailment during an earthquake. Some examples are demonstrated.