Freshwater serves as a vital energy source for ships, underscoring the paramount importance of research into desalination systems in facilitating diverse and reliable energy supply for maritime vessels. Aiming at numerous waste heat of marine engines and the shortage of freshwater resources on board, this paper designs an innovative waste heat recovery (WHR) system. It includes an organic Rankine cycle, a compression refrigeration cycle, and a humidification-dehumidification (HDH) desalination system to recover waste heat from exhaust gases in cascades, which can effectively produce power, cooling, and freshwater, respectively. A parametric study of the co-generation system in terms of the freshwater production, gained output ratio (GOR), cost per unit of freshwater production, net power output, and per unit of output power cost, are conducted to identify the key operating parameters. A set of operating parameters is determined for the HDH system with a temperature of the humidifier outlet of 358.15 K and a mass flow rate ratio (MR) of seawater to humid air of 4.5. The effect of the relative humidity and temperature of the humid air, as well as the salinity and temperature of the seawater, on the performance of the HDH subsystem are analyzed. And the optimal operating conditions of the co-generation system are obtained through multi-objective cuckoo search optimization. The results demonstrate that the co-generation system can produce an output-power of 1479.8 kW, 500 kW, and 0.49 kg/s for cooling and freshwater production by using the working-fluid R365mfc/Cyclopentane with a mixing ratio of 33:67 under optimal conditions. The GOR and cost per unit of HDH subsystem are 1.62 and 1.70 $/m3, with a capital payback period of 4.18 years. The equivalent output-power of the co-generation system is 9.5 % higher than that of an ORC system.