In this paper, a direct cooling pipe for hydrogen inside the marine hydrogen storage cylinder (HSC) was designed, and the cooling pipe was simulated and analyzed under different cooling structures and different cooling fluids using ANSYS(Fluent) 2022 R2. The simulation results show that the effect of different cooling fluids on the temperatures were nearly the same. The heat transfer coefficients, however, of various fluids were different, and the cooling temperature was also different after cooling for the same time. The cooling structures mainly affect the cooling rate of the hydrogen due to the contact area with hydrogen inside the HSC. Among the three structures investigated in this study, the cooling capacity of the spiral layout was increased by 0.85 % and 0.63 %, respectively, compared to the rectangular and wavy layout. The rectangular layout has the certain cooling effect, however, in comparison to the spiral tube structure, it has too many corners, which increases the hindering effect on the flow of cooling medium inside the tubes and affects the cooling efficiency. The wavy layout has the largest contact area, but it has the problems of uneven cooling and occupying a large amount of hydrogen storage space. Among the three structures, comprehensively speaking, the spiral layout is considered to be the optimal. The optimal performance parameters were determined by comparing the simulation results of the three layouts during cooling process with hydrogen charging being performed. The results show that the cooling pipe can achieve the hydrogen temperature to be controlled within 358 K before the hydrogen pressure in the HSC reaches 70 MPa, and the maximum temperature is 336.07 K was obtained after the completion of hydrogen filling. This paper gives technical information for optimizing the thermal performance and safety of the hydrogen fueling system.