Three Brønsted acidic imidazole dicationic ionic liquids (ILs) with different length of alkyl chains, [Cn(Mim)2][HSO4]2 (n = 3, 6, 12), were prepared and used as catalyst for the esterification reaction of free fatty acids and methanol. Taking oleic acid as model acid, the catalytic performances of the synthesized ILs for the esterification were evaluated. The main physicochemical properties of the ILs, thermal stability, acidity, solubility in common solvents, and causticity on Austenitic stainless steel 316, were examined. [C3(Mim)2][HSO4]2 demonstrated the highest catalytic activity and enabled to assess the preliminary optimum esterification condition of oleic acid and methanol. Under optimized reaction conditions, the yield of oleic acid methyl ester was up to 95 %. The ILs have great potential as catalysts for producing fatty acid methyl esters from long‐chain free fatty acids.