Ester-based drilling fluids (EBDF) are preferred over oil-based drilling fluids (OBDF) and water-based drilling fluids (WBDF) because of their great biodegradability, low toxicity, and improved performance. In this work, waste cooking oil methyl ester (WCOME) was used to prepare an environmentally friendly EBDF. Through a transesterification process utilizing a modified calcium oxide based heterogenous catalyst, the waste cooking oil is transformed into waste cooking oil methyl ester. Response surface approach was used to strengthen the transesterification. The optimize conditions for CaO/Al2O3 resulted in the highest yield of 96.56% at a molar ratio of 11.9:1, 3.19 wt % of CaO/Al2O3, 53.79 °C, and 76.86 min. In contrast, CaO/TiO2 yielded 98.15% at a molar ratio of 11.99:1, with a CaO/TiO2 of 2.53 wt % at 59.79 in 68.14 min. Additionally, two separate densities of 9 ppg and 12 ppg EBDF are formulated with two distinct oil-to-water ratios (70:30 and 80:20) using synthesized WCOME. To assess the effectiveness of formulated EBDF thorough rheological investigation is conducted at 150°. Additionally, the filtration loss at HPHT conditions, emulsion stability, and Barite sag analysis of the drilling fluid are all analyzed at before ageing and after dynamic ageing. With better rheological features, less fluid loss, good emulsion stability, and minimal barite sagging, the designed EBDF performs efficiently. The drilling fluid met the API requirement and demonstrated stability even after ageing at 250 °F for 72 h, suggesting that it may be used for extended periods of time in drilling.