The invention discloses a reversing mechanism. The reversing mechanism comprises a fixing piece, an input wheel, a first end transmission structure, a second end transmission structure, a driving wheel, a driven wheel, a moving piece, a cam, a shifting rod and a mounting wheel, the input wheel is fixedly connected with the driven wheel, the driving wheel and the driven wheel are rotationally arranged on the moving piece, the first end transmission structure is in meshed transmission with the driving wheel, the second end transmission structure is in meshed transmission with the driven wheel, the first end transmission structure and the second end transmission structure are rotationally arranged at the two ends of the moving piece correspondingly, the cam and the mounting wheel are rotationally arranged on the fixing piece, the shifting rod is arranged on the cam, the shifting rod pushes the moving piece to move up and down, so that the first end transmission structure or the second endtransmission structure is in meshed transmission with the mounting wheel. During working, external power drives the input wheel to rotate to enable the driving wheel and the driven wheel to rotate, and the shifting rod pushes the moving piece to move up and down to enable the first end transmission structure or the second end transmission structure to be in meshed transmission with the mounting wheel, so that the reversing function is realized.