The invention relates to a control method and device for eliminating system buffeting during sliding mode control of a linear motor. In the method, a sign function in the conventional sliding mode control formula is replaced by a diffusion hysteresis function, so that control voltage on a mover coil is evaluated. Due to the soft switching property of the diffusion hysteresis function, buffeting during sliding mode control is eliminated. Parameters in a formula are obtained by second-order approximation and an experiment. The device comprises a linear motor, a displacement sensor, a signal processor, a driving circuit and the like, wherein a control signal of the signal processor is connected to the driving circuit; the signal processor comprises a central processing unit, an A/D (Analog to Digital) circuit, a D/A (Digital to Analog) circuit, an ROM (Read Only Memory) module, an RAM (Random Access Memory) module, a pulse width modulation module and a signal receiving circuit, and is used for storing a formula and parameters of a sliding mode control method; and the central processing unit is used for obtaining a voltage signal of the mover coil according to the mover displacement data of the displacement sensor and regulating the voltage of the mover coil through the pulse width modulation module so as to realize stable linear movement of the mover. By adopting the method and the device, system buffeting is eliminated effectively, and the running reliability is enhanced; and the method and the device are easy to realize.