Roll-on roll-off (RoRo) shipping plays an important role in freight transport on the European continent, and is faced with the challenge of reducing its CO2 emissions while increasing its efficiency. Dual cycling, in which loading and discharging processes are carried out simultaneously, achieves this goal by reducing the turnaround time of vessels in port and thus the CO2 output of handling equipment in port and fuel consumption through slow steaming at sea. Optimizing the dual cycling operations on RoRo vessels has not yet been investigated in the literature. This paper presents the novel RoRo dual cycling problem (RRDCP), and formulates it using integer programming (IP) with the objective to minimize the total makespan of discharging and loading operations. We further prove that the RRDCP is NP-complete by a reduction from a general machine scheduling problem, and introduce a novel heuristic to solve the problem called a generalized random key algorithm (GRKA). We evaluate the IP model and GRKA approach on both generated and industrial instances, showing that the GRKA heuristic finds optimal or near-optimal solutions to real-world problems in just seconds. We provide managerial insights on industrial instances, which indicate that our approach leads to a reduction in fuel consumption and CO2 emissions of up to 25% for RoRo operations.