The invention discloses a device and method for replacing a track slab of a slab ballastless track. The device comprises a lateral sliding mechanism, a temporary support structure and traction equipment, wherein the temporary support structure is used for performing horizontal support on the lateral sliding mechanism; the traction equipment is used for driving a track slab which needs to be laterally moved to laterally slide on the lateral sliding mechanism; the lateral sliding mechanism is horizontally arranged on the temporary support structure; and the lateral sliding mechanism is erected above a base plate on which a damaged track slab is located through the temporary support structure. The method comprises the following steps of: I, moving up steel rails; II, moving up the damaged track slab; III, erecting the lateral sliding mechanism; IV, laying the damaged track slab flatwise; V, moving right the damaged track slab; VI, hoisting the damaged track slab away and lifting a new track slab; VII, moving left the new track slab; VIII, removing the lateral sliding mechanism; IX, installing the new track slab; and X, moving down the steel rails and mounting. The device for replacing the track slab of the slab ballastless track is reasonable in design, easy and simple in use and operation and good in using effect, and the method for replacing the track slab of the slab ballastless track can be conveniently realized, and can be used for efficiently, rapidly and simply completing the replacement process of the track slab of the slab ballastless track.