The invention provides a servo motor driven type in-die variable-speed tapping machine with a screw tap detection device. The servo motor driven type in-die variable-speed tapping machine consists of a servo motor, a servo motor controller, an in-die tapping machine, a guide sleeve, a limiting post, a fixed plate, a connecting plate, a guide post, a moving plate, a screw tap detection head and a nitrogen spring, wherein the servo motor is functionally connected with a screw tap spindle assembly through a gear group, the servo motor controller is connected with the servo motor through a conducting wire, the moving plate is arranged on the guide post in a sleeving manner, the bottom surface is supported by the nitrogen spring, and the screw tap detection head is arranged in the position coaxial with the screw tap spindle assembly on the moving plate. As the screw tap spindle assembly is driven by using the servo motor, three speeds are separately set in the tapping process, and the screw tap detection head is arranged in the position coaxial with the screw tap spindle assembly on the moving plate, a rotating speed suitable for material hardness can be selected during tapping so as to prevent a screw tap and taped products from being damaged, and at the same time, whether the screw tap exists or not can also be effectively detected so as to ensure the production efficiency and processing quality of subsequent product continuous processing.