BOG re-liquefaction process is a necessary part for the safety of LNG cargo ships, and it is also the most common way to deal with evaporated gas (BOG) in LNG ships. Therefore, how to optimize the re-liquefaction process and save energy consumption is a problem that cannot be ignored in BOG re-liquefaction system. In this paper, based on the traditional BOG re-liquefaction process, a liquid nitrogen precooling circulation system is added and linked with the nitrogen purging system. Aspen HYSYS software was used to simulate and analyze the exergy efficiency, specific power consumption, exergy efficiency in the proposed liquefaction process. In addition, we introduced a bacterial foraging algorithm to optimize the process parameters. According to the operation results, the optimized process has a specific power consumption of 1.028 kWh/kgLNG, which is 21.53 % lower than that of the original NH3 and CO2 precooling system. Changing the traditional precooling system to liquid nitrogen tank reduces the complexity of the liquefaction system and improves the reliability of the system. Because liquid nitrogen has excellent cryogenic energy, small size, cheap price, safety in the actual use process and the linkage with the purge device on board, it shows excellent performance in the process of BOG pre-cooling liquefaction.