The synthesis of biodiesel from renewable resources has immense potential as a sustainable and cost-effective energy alternative. In this work, a reusable –SO3H functionalized heterogeneous catalyst that has a total acid density of 2.06 mmol/g was prepared from walnut (Juglans regia) shell powder by low-temperature hydrothermal carbonization (WNS-SO3H). Walnut shell (WNS) contains more lignin (50.3%), which shows great resistance toward moisture. The prepared catalyst was employed for the effective conversion of oleic acid to methyl oleate by a microwave-assisted esterification reaction. The EDS analysis revealed the significant presence of sulfur (4.76 wt%), oxygen (51.24 wt%), and carbon (44 wt%) content. The results of the XPS analysis confirm the bonding of C–S, C–C, C=C, C–O, and C=O. Meanwhile, the presence of –SO3H (the responsible factor for the esterification of oleic acid) was confirmed by FTIR analysis. Under the optimized conditions (9 wt% catalyst loading, 1:16 oleic acid to methanol molar ratio, 60 min reaction time, and 85 °C temperature), the conversion of oleic acid to biodiesel was found to be 99.01 ± 0.3%. The obtained methyl oleate was characterized by employing 13C and 1H nuclear magnetic spectroscopy. The conversion yield and chemical composition of methyl oleate were confirmed by gas chromatography analysis. In conclusion, it can be a sustainable catalyst because the catalyst preparation controls the agro-waste, a great conversion is achieved due to the high lignin content, and the catalyst was reusable for five effective reaction cycles.