A surgical instrument and a drive mechanism, the drive mechanism includes a motor, a planetary gear train, and a bidirectional ratchet mechanism; the input sun gear of the planetary gear train engages the output shaft of the motor; an output carrier of the planetary gear train engages an executing mechanism of the surgical instrument through a transmission mechanism; the bidirectional ratchet mechanism includes a ratchet, a bidirectional pawl assembly, and a stop; the ratchet is in rigid connection with an annular gear of the planetary gear train; the bidirectional pawl assembly includes a bidirectional pawl; the stop selectively drives a first end or a second end of the bidirectional pawl to lock the ratchet, so as to lock corresponding rotation of the ratchet when the motor drives the planetary gear train, and unlock corresponding rotation of the ratchet when the transmission mechanism drives the planetary gear train.