<p>A rail locking device is disclosed. The rail locking device comprises: a movable rail; a slider buried in the rail to slide with the movement of the rail; a swing arm to swing while supporting the slider; and a locking member mounted on the slider to lock the rail into the slider or to loosen the rail from the slider. Therefore, the rail locking device smoothly locks or loosens the rail and opens and closes a vehicle door in the longitudinal direction of a vehicle when installed in the vehicle door.</p>