This study develops a real-time co-simulation solution that combines ANSYS and MATLAB for investigating of the train–track–bridge dynamic interactions, with the aim of providing an effective and robust method for analyzing and assessing the dynamic responses of running train and bridge, considering their complex nonlinear behaviors under extreme excitations such as earthquake and strong wind. The train–track–bridge coupled system consists of the train subsystem, the track subsystem, and the bridge subsystem. With the adoption of a previously developed efficient multi-time-step method, the train subsystem and the track subsystem are analyzed in MATLAB with a small time-step, whereas the bridge subsystem is analyzed in ANSYS using a large time-step. At each large time-step, the train–track subsystem in MATLAB and the bridge subsystem in ANSYS are coupled by communication of the track reaction forces calculated in MATLAB and the dynamic responses at the track–bridge connecting points calculated in ANSYS. The co-simulation procedure is validated through a comparison of the numerical results from computer coding developed by the authors and the measurement data of a cable-stayed bridge. To demonstrate the effectiveness and robustness of the proposed solution, the responses of a train passing through a cable-stayed bridge under earthquake excitation are analyzed, with consideration of the geometrical nonlinearity of the bridge, using the co-simulation solution.