The potential of reactivity controlled compression ignition (RCCI) combustion fueled with hydrogen and diesel (i.e. hydrogen/diesel RCCI) was evaluated using multi-dimensional simulations embedded with a reduced chemical mechanism. In hydrogen/diesel RCCI, the premixed hydrogen is ignited by the diesel, which is directly injected into the cylinder well before the top dead center. To investigate the potential benefits of hydrogen/diesel RCCI, its combustion characteristics were compared with that of gasoline/diesel RCCI from the perspective of the second law of thermodynamics. Meanwhile, the impacts of premixed energy ratio and initial pressure on the exergy distribution for hydrogen/diesel RCCI were explored. The results show that hydrogen/diesel RCCI has an advantage over gasoline/diesel RCCI in the reduction of exergy destruction due to higher combustion temperature, shorter combustion duration, and the distinctive oxidation pathways between hydrogen and gasoline. A higher proportion of exergy output work can be achieved for hydrogen/diesel RCCI under the conditions with the same total input energy and 50% heat release (CA50) point. Moreover, a larger premixed energy ratio (i.e. larger hydrogen proportion) is helpful to elevate exergy output work and reduce exergy destruction owing to higher combustion temperature and the undergoing oxidation pathways of hydrogen with less exergy destruction. A higher initial pressure yields raised exergy destruction because of lower combustion temperature and longer combustion duration, but exergy output work is increased owing to the significantly reduced exergy transfer through heat transfer.