The invention discloses an automatic nut fastening machine interacting with a robot. The automatic nut fastening machine mainly comprises a worktable, a pneumatic clamping jaw, a clamping jaw bracket,a nut fastening mechanism, a Y-axis guide rod, a Y-axis electric cylinder and a control system; the nut fastening mechanism comprises a servo motor, a reducer, an encoder, and a nut mounting mould; when the robot clamps a workpiece to the clamping position of the pneumatic clamping jaw, the control system controls the pneumatic clamping jaw to open, clamp and fix the workpiece; the control systemcontrols the nut fastening mechanism to perform parallel movements of rotation and upward movement, wherein the servo motor performs a positive rotation or a counter rotation, and the Y-axis electriccylinder performs an upward movement or a downward movement, so that the nut tightening or loosening action is achieved. With the adoption of the automatic nut fastening machine, the constant value preloading of the nut can be realized, the consistency of the test body of a post-tension test is ensured, the stability of the tension test results is improved greatly, and the work efficiency is improved through the overall control of the control system.