An assembling and positioning device of a middle door lock body for railway transportation. The assembling and positioning device of the middle door lock body for railway transportation comprises a support, a rotating platform, a motor, a rotating seat and a light sensation positioning assembly. The rotating platform is fixed on the upper portion of the support, the rotating seat is mounted on the rotating platform, a groove for placing of the head of the lock body is formed in the upper end face of the rotating seat, and a rotating shaft of the motor is connected with the lower end of the rotating seat. The light sensation positioning assembly comprises an infrared transmitting tube and an infrared receiving tube, the transmitting line and the receiving line of the infrared transmitting tube and the infrared receiving tube are consistent with the direction of the axis of an oblique hole in the lock body, and the infrared receiving tube is connected with the motor. The lock body is mounted on the rotating seat, the motor drives the rotating seat to rotate, the rotating seat drives the lock body to rotate, when the lock body rotates to a specific angle, light emitted by the infrared transmitting tube penetrates through the oblique hole to be captured by the infrared receiving tube, the infrared receiving tube is connected with the motor, an outside control circuit senses and controls the motor to stop rotating, and positioning operation of the lock body is achieved. The assembling and positioning device of the middle door lock body for railway transportation is convenient to operate and accurate to position.