Dual fuel engines with LNG as fuel have become a feasible solution for ship power units in the current situation, but their fuel efficiency needs to be further enhanced to meet the increasingly stringent emission requirements. This paper designs a dual-loop system, including a supercritical CO2 power cycle and a thermally driven ejector refrigeration cycle, for recovering the exhaust gas and charge air heat of a marine dual fuel engine. The models of the waste heat recovery system, the evaluation indicators of the combined system, and the genetic algorithm optimization program are developed. Compared to the standalone machine, the waste heat recovery system can improve by about 9.3% of the engine’s fuel efficiency. The performance analysis shows that the ejector contributes to the highest share of exergy destruction and accounts for approximate 53% of the refrigeration cycle. There are optimal values for the compressor inlet temperature of about 8.1 MPa and for the turbine inlet temperature of about 305 °C. Finally, after optimization, the specific fuel consumption, fuel efficiency, and CO2 emissions of the combined system are around 137.9 g/kWh, 53.3%, and 537.4 g/kWh, respectively. It provides a feasible solution in which the charge air cooler can be wholly replaced by the ejector refrigeration cycle.