Methyl laurate was synthesized from lauric acid (LA) and methanol via an esterification reaction using ionic liquids (ILs) as catalysts. The efficiencies of three different catalysts, 1-methylimidazole hydrogen sulfate ([Hmim]HSO4), 1-methyl-2-pyrrolidonium hydrogen sulfate ([Hnmp]HSO4) and H2SO4, were compared. The effect of the methanol/LA molar ratio, reaction temperature, reaction time and catalyst dosage on the esterification rate of LA was investigated by single-factor experiments. Based on the single-factor experiments, the esterification of LA and methanol was optimized using response surface methodology. The results showed that the most effective catalyst was the IL [Hnmp]HSO4. The optimal conditions were as follows: [Hnmp]HSO4 dosage of 5.23%, methanol/LA molar ratio of 7.68 : 1, reaction time of 2.27 h and reaction temperature of 70°C. Under these conditions, the LA conversion of the esterification reached 98.58%. A kinetic study indicated that the esterification was a second-order reaction with an activation energy and a frequency factor of 68.45 kJ mol−1 and 1.9189 × 109 min−1, respectively. The catalytic activity of [Hnmp]HSO4 remained high after five cycles.