Accurately identifying the axle loads of the moving train on the railway bridge can provide reliable information for assessing the safety of the train–bridge system. Bridge weigh-in-motion, namely, BWIM, is an effective approach for identifying the positions and weights of the train axles based on the monitored bridge responses. Existing BWIM methods generally focus on identifying the probable value of the axle weights instead of quantifying the identification uncertainty. To address this issue, a novel two-stage train load identification framework for the medium-small railway bridge is developed by combining the virtual axle theory and Bayesian inference. In the first stage, the axle configuration including the axle number, axle spacing and axle weight of the moving train, are estimated according to the modified virtual axle theory in which a clustering algorithm is embedded to automatically determine the axle number. In the second stage, the most probable value (MPV) and the uncertainty of the train axle weight are accurately identified using the Bayesian inference method which takes five types of error patterns into consideration. Finally, the proposed framework is verified using the data from numerical simulations and an in-situ railway bridge. Results show that the proposed framework can improve the accuracy of train load identification after quantifying the uncertainty of estimated axle weights and can confirm the confidence interval of the individual axle weight and gross train weight.