Bio-oil from lignocellulosic biomass pyrolysis cannot be applied as biofuel because it is generally corrosive due to its high organic acid content. The organic acid content of heavy fractions can be reduced by fractionation and by esterification with alcohol to form ester compounds. This study aims to produce high-quality fuel by optimizing the bio-oil: methanol ratio using a magnesium metal oxide modified H-zeolite catalyst (HAAZ/MgO) to convert sago dregs bio-oil. This study was carried out in several stages: pyrocatalytic sago dregs were heated to 350–500 °C, then the bio-oil was filtered and fractionally distilled at 91–110 °C. HAAZ/MgO catalyst was successfully synthesized according to Fourier transform infrared spectroscopy (FTIR) characterization, showing absorption at 3300–3700 cm-1, the emergence of hydroxyl group (-OH) stretching vibrations originating from silanol groups (Si-OH) and Brønsted acid sites (Si-OH-Al), 1641–1649 cm-1 as H-O-H bending vibrations, 1053–1223 cm⁻¹ asymmetric stretching vibrations of Si-O-Si and Si-O-Al bonds, and 1350–1450 cm⁻¹ indicating the presence of MgO-zeolite. The X-ray diffraction (XRD) spectrum of HAAZ/MgO shows diffraction peaks at 2θ = 20.86°, 25.67°, 26.65°, and 27.74°. The presence of MgO does not damage the HAAZ structure and is evenly dispersed. The fractionated distillate was esterified by reflux at 65 °C. at the ratio of bio-oil distillate to methanol (1:6, 1:8, and 1:10) using HAAZ/MgO catalyst. The esterified biofuel showed the best yield at a 1:10 ratio, with 72.22 ± 1.11% (v/v). The esterification process demonstrated the HAAZ/MgO catalyst's good performance, yielding dimethyl and methyl esters. In addition, the physicochemical properties of bio-oil, including pH, viscosity, and API gravity, increased significantly after esterification, while water content, density, specific gravity, and viscosity decreased. Meanwhile, the higher heating value (HHV) of the esterified biofuel increased from 43.55 to 45.15 MJ/kg. Improvements in these parameters indicate that the esterification process plays an important role in enhancing biofuel quality, making it a feasible and efficient renewable energy source.