This study explores the impact of compression ratio (CR) and fuel blends on the combustion properties of a diesel engine fueled by conventional diesel and biodiesel derived from Moringa oleifera. The research was conducted on a single-cylinder diesel engine with variable compression ratio (VCR) and common rail direct injection (CRDI), utilizing diesel and Moringa oleifera biodiesel blends MB10, MB20, and MB30. The experimental conditions included varying the CR between 15:1 and 18:1, maintaining an injection timing of 23 degrees before top dead center, injection pressure set at 600 bar, and an engine speed of 1500 rpm under 100% load. The findings revealed that increasing the CR raises cylinder pressure (CP), cumulative heat release rate (CHRR), and rate of pressure rise (ROPR) for all the tested fuel blends. Notably, the diesel exhibited the highest CP of 70.83 bar, CHRR of 1.36 kJ, and ROPR of 6.42 bar/degrees CA (degree per crack angle) at a CR of 18:1. Among the biodiesel blends, MB30 showed the highest CP of 69.21 bar, while MB10 displayed highest CHRR and ROPR of 1.5 kJ and 6.17 bar/degrees CA, respectively. Furthermore, the net heat release rate (NHRR) and mean gas temperature (MGT) decreased with rising CR for all tested fuels. At a lower CR of 15:1, the diesel showcased the highest NHRR and MGT of 69.75 J/degrees CA and 1303.69 degrees C, respectively, whereas, in the case of biodiesel blends, MB20 demonstrated the highest values of 67.53 J/degrees CA and 1287.39 degrees C, respectively, at the same CR. Meanwhile, the ignition delay (ID) and combustion period diminish with a rise in the CR for all tested fuel blends. At a higher CR of 18:1, the minimum ID and combustion duration for diesel were reported as 17 degrees CA and 15 degrees CA, respectively. For the biodiesel blends, MB10 and MB30 showed a minimum ID of 16 degrees CA, while MB10 and MB20 exhibited minimum combustion duration of 15 degrees CA at the same CR.