A structure for preventing derailment of a railway vehicle, whereby escape prevention device main bodies are each configured to be installed on left and right sides of a lower part of a bogie main body of the vehicle; whereby the escape prevention device main bodies have wide grooves in which escape preventing thick plates are housed so as to be vertically slidable; whereby when the structure for preventing derailment is mounted on the vehicle and its wheels are on rails in a normal state, front surfaces of the escape preventing thick plates and side surfaces of rail heads are spaced apart approximately 15 mm; and whereby the escape preventing thick plates have lower ends provided with L-shaped hook parts; the hook parts comprising upper sides configured to be arranged under eaves of the rail heads with a distance of approximately 15 mm; the structure for preventing derailment of a railway vehicle furthermore comprising positioning pins driven into the escape preventing thick plates from the escape prevention device main bodies; in such a way that when the vehicle comprising said structure for preventing derailment runs on a railway track curved to the right, and a centrifugal force causes a flange part of the left wheel to ride on the left rail, the left escape prevention device main body moves obliquely upward toward the rail, the front surface of the escape preventing thick plate collides with the side surface of the rail head, the L-shaped hook part of the escape preventing thick plate being configured to collide with a lower surface of the eave of the rail head, the escape prevention device main body deviates further upwards, thereby cutting the positioning pin between the escape prevention device main body and the escape preventing thick plate, the escape prevention device main body is guided by the escape preventing thick plate, is deviated essentially vertically upwards by 10 cm or more, and then is allowed to fall down, the wheel is returned onto the rail, and the derailment is prevented; and in such a way that when the bogie main body of said vehicle jumps up due to an earthquake, the L-shaped hook parts of the left and right escape preventing thick plates collide with the eaves of the left and right rail heads, thereby cutting the left and right positioning pins, whereby the left and right escape prevention device main bodies are further guided by the escape preventing thick plates fitted to the wide grooves of the escape prevention device main bodies, and the bogie main body is deviated essentially vertically upwards by 10 cm or more, and then, dropped to original positions, and the derailment is prevented. whereby the escape prevention device main bodies have wide grooves in which escape preventing thick plates are housed so as to be vertically slidable; whereby when the structure for preventing derailment is mounted on the vehicle and its wheels are on rails in a normal state, front surfaces of the escape preventing thick plates and side surfaces of rail heads are spaced apart approximately 15 mm; and whereby the escape preventing thick plates have lower ends provided with L-shaped hook parts; the hook parts comprising upper sides configured to be arranged under eaves of the rail heads with a distance of approximately 15 mm; the structure for preventing derailment of a railway vehicle furthermore comprising positioning pins driven into the escape preventing thick plates from the escape prevention device main bodies; in such a way that when the vehicle comprising said structure for preventing derailment runs on a railway track curved to the right, and a centrifugal force causes a flange part of the left wheel to ride on the left rail, the left escape prevention device main body moves obliquely upward toward the rail, the front surface of the escape preventing thick plate collides with the side surface of the rail head, the L-shaped hook part of the escape preventing thick plate being configured to collide with a lower surface of the eave of the rail head, the escape prevention device main body deviates further upwards, thereby cutting the positioning pin between the escape prevention device main body and the escape preventing thick plate, the escape prevention device main body is guided by the escape preventing thick plate, is deviated essentially vertically upwards by 10 cm or more, and then is allowed to fall down, the wheel is returned onto the rail, and the derailment is prevented; and in such a way that when the bogie main body of said vehicle jumps up due to an earthquake, the L-shaped hook parts of the left and right escape preventing thick plates collide with the eaves of the left and right rail heads, thereby cutting the left and right positioning pins, whereby the left and right escape prevention device main bodies are further guided by the escape preventing thick plates fitted to the wide grooves of the escape prevention device main bodies, and the bogie main body is deviated essentially vertically upwards by 10 cm or more, and then, dropped to original positions, and the derailment is prevented.