Finding an alternative energy source that satisfies our energy needs while being ecologically beneficial is vital. This study aimed to synthesize biodiesel of ASTM standard from the non-edible seed oil of Capsella bursa-pastoris (L.) Medik over cheap MgO nanoparticles using various characterization techniques like XRD, SEM, FT-IR, GC-MS, and NMR. The optimum 92% biodiesel yield was achieved at a 1:15 oil-to-methanol ratio using 30 mg catalyst concentration at a temperature of 60 °C, and the 40 min reaction time. The low acid value (0.39 KOH mg/kg) and in-range kinematic viscosity (4.16 cSt at 40 °C) of biodiesel is close to the conventional diesel, whereas the low calorific value (27933 KJ/Kg) indicates the presence of more oxygen in biodiesel than conventional one. Very low sulfur % wt (0.0126) ensures the eco-friendly nature of synthesized biodiesel. 42.72 MJ/kg Higher heating value (HHV), 47 cetane number, 2.89 h oxidative stability, 0.041 mg/Kg water content, 349 °C Distillation temperature (for 90% recovery) and 0.037 carbon residue and presence of mostly unsaturated methyl esters (FAMEs) make the synthesized biodiesel engine friendly, good fuel efficacy and competitive source for the commercial production.