The interfacial microhabitat induced by triazole ionic liquid ([124Triz]−) electrolyte can effectively enhance formate selectivity for electrochemical CO2 reduction reaction. However, the catalytic mechanism remains unclear. Herein, we combined molecular dynamics simulation and density functional theory to reveal the regulatory mechanism. The results showed that the dipolar interaction between CO2 and [124Triz]− cooperating the hydrogen bonds between [124Triz]− and H2O facilitate the accumulation of H atoms around C atoms of CO2. Meanwhile, the strong polar [124Triz]− induces negative electrostatic potential for the H atoms of H2O near anions. As a result, the negative H atoms are more likely to attack the positive C atoms of CO2, which results in a lower free energy of -0.10 eV for the formation of *HCOO intermediate and promotes the formation of formate. Thus, the [124Triz]− contributes to high formate selectivity owing to the combined effects of strong CO2-dipole interaction and hydrogen bonds with H2O.