Heat exchangers are widely used in ocean conditions, and the swing motion is a fundamental motion. Investigation of flow and heat transfer characteristics of a tube and shell heat exchanger (TSHX) under swing conditions will provide some guidance for improving the efficiency and stability of TSHX. This research studied the transient flow and heat transfer characteristics of a small TSHX under varies swing conditions with the computational fluid dynamics method. Compared to the experimental values, the uncertainty of simulation result was within ±10%. The fluctuation amplitudes will risewhen the swing amplitude and frequency increase, and the fluid velocity exhibits fluctuations with inconsistent periods in different flow directions, which is attributed to the additional force induced by carrier swing motion. Besides, the flow direction of the shell-side fluid periodically reverses, leading to periodic changes in the heat transfer performance of the heat transfer tubes. The temperatureof tube-side fluid in collision walls is higher, while the fluid temperature in the opposite wall side is lower.