The invention discloses a tunnel-mode ESP (electronic stability program) hardware encapsulating device on the basis of IPSEC (internet protocol security) protocols, and belongs to the field of network data security. The tunnel-mode ESP hardware encapsulating device comprises a plurality of tunnel-mode ESP encapsulating units. The tunnel-mode ESP encapsulating units are connected with one another by buses and work in ping-pong modes, and each tunnel-type ESP encapsulating unit comprises a data analysis module, a group of encryption modules, an IPV4 (internet protocol version 4) header regrouping module, an IPV6 (internet protocol version 6) regrouping module, a data temporary storage module, a data assembling module, an authentication module and an IP (internet protocol) header checksum module. Compared with the prior art, the tunnel-mode ESP hardware encapsulating device has the advantages that data packets to be encapsulated are segmented, formats of each segment of data are changed, accordingly, start bits or length verification fields are added to the data packets, and the data can be safely and efficiently encapsulated; a plurality of encapsulating modules are mounted, so that the ping-pong operation modes can be implemented, and the encapsulating speeds further can be increased.