Conventional fuels are exhaustive and produce more emissions. Recent studies have concentrated on discovering and creating clean alternative fuels like biodiesel to reduce harmful emissions and enhance engine performance. In the present work, biodiesel is made from hibiscus cocos nucifera oil by using the transesterification process. Experiments were conducted on a variable compression ratio diesel engine by using input parameters as compression ratios of 15, 16, 17, and 18, loads of 25%, 50%, 75%, and 100%, and blends of B30, B50, B75, and B100. The performance, emission, and combustion characteristics are measured. The results show that brake thermal efficiency, carbon monoxide, hydrocarbons, smoke, and cumulative heat release increase; brake-specific fuel consumption, nitrogen oxide, cylinder pressure, and net heat release decrease. The response surface method is used to optimize the engine variables. The optimized input conditions are the engine load 33%, blend B30, and compression ratio 15. The model is validated by comparing the predicted and confirmed results with an error of less than +/- 2%.