Conventional homogeneous catalysts exhibit rapid reaction kinetics and affordability but face challenges including the cumbersome separation of catalysts, product purification complexities, and the generation of wastewater. In response, acid-treated melem and graphitic carbon nitride catalysts have been explored as heterogeneous alternatives for the esterification of oleic acid. Melamine, characterized by its repeating C-N bonds, is synthesized via thermal polymerization, began to condensed into melem and leading to further condensation into carbon nitride. The unique graphitic structure and nitrogen content confer upon carbon nitride enhanced chemical and thermal stability, as well as the potential for chemical modifications. In this investigation, oxygen-containing functional groups were introduced to the carbon nitride framework through a singular acid treatment coupled with sonication. The resulting catalysts were comprehensively characterized employing X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), Fourier transform infrared spectroscopy (FTIR), and temperature-programmed desorption/mass spectroscopy (NH3-TPD/MS).