The embodiment of the invention provides a speed-testing distance-measuring method for railway trains. The method comprises the steps of respectively obtaining first driving data and second driving data through a speed sensor module and an accelerometer module, wherein the first driving data comprises a first speed and a first distance, and the second driving data comprises a second speed and a second distance; and according to the first driving data and the second driving data, judging whether an idling slippage condition is met, according to the judgment result, determining to adopt the first speed and the first distance, or according to the second speed and the second distance, obtaining current speed-testing distance-measuring results. According to the embodiment of the invention, thefirst driving data of a speed collecting module and the second driving data of the accelerometer module are obtained, whether the predetermined idling slippage condition is met is judged, and according to the judgment result, the speed-testing distance-measuring results of the railway train are obtained according to the first driving data or the second driving data, so that the reliability and theaccuracy of the speed-testing distance-measuring results can be guaranteed.