With the booming development of high-speed railways (HSRs), key technologies of wireless communications need to be constantly innovated. In particular, the frontier issue of low delay of the handover for the fifth generation (5G) in fast-moving scenarios has attracted attention from both industry and academia. Based on an analysis of a large number of measured data and the location of the user equipment (UE), a fast handover algorithm is proposed to solve the problem of long delay for a train moving at high speed in a 5G-railway (5G-R). By calculating the speed of a train and its direction of movement, a reasonable handover mode is selected and the handover chain of neighboring cells is identified. The location of the train can be calculated to determine whether UE enters the defined identification zone of pre-handover. Depending on the values collected in the measurement report, the command of the handover is triggered when the weight of the target cell is greater than that of the source cell. Our experimental results show that the delay of the fast handover algorithm is reduced by 2.03%, and the success rate of the handover is increased by 0.42%. Research directions for smart railways are discussed based on these findings.