The invention relates to an automatic nut replacing mechanism. The automatic nut replacing mechanism comprises an installing frame, a supporting base installed on the installing frame, a first air cylinder assembly arranged on the installing frame and used for jacking the supporting base, a nut driver arranged at the upper end of the supporting base, a slide rail arranged on the supporting base and a clamping plate assembly arranged on the slide rail and used for clamping the nut driver. The clamping plate assembly comprises sliding blocks arranged at the two ends of the slide rail respectively, a left sliding block, a right sliding block, a left fixing plate, a right fixing plate and a second air cylinder, wherein the left sliding block and the right sliding block are arranged on the sliding blocks at the two ends of the slide rail respectively, the left fixing plate and the right fixing plate are fixedly connected with the left sliding block and the right sliding block respectively, the left sliding block and the right sliding block are provided with corresponding clamping plates respectively, and the clamping plates are used for clamping the nut driver. The automatic nut replacing mechanism has the beneficial effects that the clamping plate assembly is arranged to clamp or loosen the nut driver so that mobility of the nut driver can be controlled, and the first air cylinder assembly is arranged to improve the nut replacing work of the nut driver.