A stable synthesis method for ester compounds was introduced,to overcome the ester hydrolysis problem of traditional ester based drilling fluids during the drilling process.The synthesized ester compounds have high thermal stability and hydrolysis stability through the use of transesterification reaction method.The reaction was carried out using 2-ethylhexanol and methyl laurate in the presence of sodium formate catalyst.The optimal synthesis conditions were evaluated using response surface methodology(RSM)and central composite design(CCD),and the optimal conditions were determined.The experimental results indicated a high degree of consistency between 77%2-ethylhexyl ester and the RSM model.The reaction product contained 77%2-ethylhexyl ester and 23%2-ethylhexyl alcohol.Its kinematic viscosity was 5 mm2·min-1 at 40℃and 1.5 mm2·min-1 at 100℃;The relative density was 0.854,the flash point was 170℃,and the pour point was-7℃.The drilling fluid mud using this formula had superior rheological properties at 120℃.