In the current study, rice husk ash (RHA) was used as a support in the fabrication of a heterogeneous catalyst (RHA/CuO/K2CO3) for generating biodiesel from sunflower and castor oil. The value of specific surface for RHA, CuO, RHA/CuO, and RHA/CuO/K2CO3 was determined to be 3.63, 54.29, 25.47, and 8.17 m2/g, respectively. Based on the average surface roughness (Ra), the inclusion of CuO in the RHA structure improved the roughness which can improve the interaction of the active phase (K2CO3) with the catalyst structure. The maximum biodiesel production from sunflower (99.2%) and castor oil (98.1%) was obtained at the amount of catalyst of 3 wt%, ‘CH3OH: oil’ molar ratio of 18:1, the reaction temperature of 65 °C, and the time of 120 min. The activation energy for the transesterification process of sunflower and castor oil was calculated to be 52.79 and 40.09 kJ/mol, respectively. Also, the H number for the transesterification process of sunflower and castor oil was determined as 50.05 and 37.35 kJ/mol, respectively, which shows that the transesterification is an endothermic process. Based on the environmental factor (<0.5), the biocompatibility of the process and the produced fuel was confirmed. It should be noted that the quality of the biodiesel was according to ASTM D6751 and EN 14214 standards and can replace traditional diesel.