The invention discloses an automatic detection device for elevator guide rails, comprising a base, a first chute is formed on the base, a first rack is formed in the first chute, and a first gear is arranged on the bottom plate , the first gear is meshed with the first rack, the bottom plate is provided with a second chute, the second chute is provided with a second gear, and the bottom of the detection plate is formed with a hole parallel to the second chute. The second rack, the second rack is meshed with the second rack; the first gear is fixedly inserted on the first rotating shaft, one end of the first rotating shaft is fixedly connected to the output shaft of the drive motor, and the other end An external spline part is formed, and a first bevel gear with an internal spline hole in the center is inserted into the external spline part, and the second gear is fixedly inserted on the second rotating shaft, and the second rotating shaft is fixed A second bevel gear is plugged in. The invention has simple structure and reduces production cost.