The invention relates to an assembly line sensor displacement detection device with an automatic early warning function, which comprises a machine body, and is characterized in that a fastening plateis movably inserted into the inner wall of a mounting base, a friction chain belt is mounted on the fastening plate through a roller shaft, a protruding plate corresponding to a rotating plate is fixedly connected to the roller shaft, a striking rod is fixedly connected to the bottom of a sliding base, a compressed spring is mounted between the sliding base and a limiting ring, a baffle is movablyinserted below the limiting ring, an inserting rod corresponding to the baffle is fixedly connected to the sliding base, and an alarm bell is fixedly mounted at the bottom of the mounting base. Whena sensor main body deflects left and right, the fastening plate is extruded to move, and the fastening plate extrudes the sliding base to move downwards; when the sensor main body slides downwards, the friction chain belt and the roller shaft are driven to drive the protruding plate to rotate, the protruding plate extrudes the sliding base to move downwards through the rotating plate, the downwards-moving sliding base causes deformation of the compressed spring for energy storage, then the inserting rod extrudes the baffle to move away, the striking rod strikes an alarm bell to give an alarm,and workers are reminded to conduct inspection and maintenance in time. The device is simple in structure is simple and convenient to use.