The synthesis of 2-ethylhexyl mercaptoacetate by chlorocetic acid and 2-ethylhexanol was investigated in various 1,3-dialkeylimidazolium and alkylpyridium ionic liquids under mild conditions.The investigation suggested that 1-butyl-3-methylimidazolium bromide ionic liquid had optimal catalytic activity for the esterification,and the solvent composed of 1-buty-3-methylimidazolium hexafluorophosphate and water could serve as a phase transfer catalyst for 2-ethylhexyl mercaptoacetate.Medium to high conversion and selectivity were achieved.The isolation of the desired products could be achieved via simple decantation and ionic liquids could be reused.The catalytic activity was not decreased obviously after 5 times recycle.This protocol has notable advantages of no need of organic solvents,mild conditions,simple operation,short reactioin time,ease work-up,high yields and recycling of the ionic liquid.