The present disclosure relates to an electric surgical stapler, including a handle the handle having a handle body, a driving motor and a control unit for controlling the driving motor to operate; a working head, including an anvil, a cartridge, a closing mechanism, a firing mechanism, a housing for accommodating the closing mechanism and the firing mechanism, a closing limit switch, and a closing height adjustment shift switch configured to transmit information of a closing height control shift to the control unit, wherein during closing, the control unit is configured to control the closing mechanism to move until the closing limit switch is triggered so that a closing distance between the anvil and the cartridge is at a preset closing height, and the control unit is further configured to control the closing mechanism to move after receiving information transmitted from the closing limit switch, so that the closing distance between the anvil and the cartridge is adjusted to be consistent with a preset closing distance corresponding to a current shift of the closing height adjustment shift switch. Since a certain distance is closed in advance, clearances in the transmission mechanism have been eliminated, and the adjustment of the closing height can be accurately implemented to achieve desired closing height.