The present study focused on using dual-fuel such as Mahua oil biodiesel and biogas in a diesel engine to analyze performance and emission by varying compression ratio (CR) and engine loads. Following the experimental step, the response surface approach was used to model-predict, and optimize. The variance analysis was used to create relationship functions between the independent control variables (engine loads and CR) and their dependent response variables (performance and emission indices). A robust model is indicated by a high coefficient of determination value for all outputs (0.8673 – 0.9917). The optimization yielded 15.25% brake thermal efficiency, 326 °C exhaust gas temperature, 2.85 kg/h biogas flow rate, 68.9% liquid fuel replacement, and 44 bar peak cylinder pressure. A trade-off study of engine performance vs. emission at optimal operating settings produced 4.45 vol% CO2, 39 ppm NOx, 90 ppm HC, and 90.17 ppm CO. The validation test in the lab revealed that all of the predicted output was within a 6% error range. This research indicated that dual-fuel might be an excellent choice for improving waste-to-energy prospects, performance, and emissions.