This study pioneered in applying two Gemini surfactants with different spacers to corrosion protection. Bis‐N, N, N,‐hexadecyldimethyl‐p‐biphenylenediammonium dichloride (BHBP) and 1,3‐bis (hexadecyldimethylammonio)‐2‐hydroxypropane dichloride (BHHP) were successfully prepared. In order to study the impact of various spacer functional groups on the performance of corrosion inhibitors, a number of different tests were conducted, including electrochemical experiments, weight loss test, surface analysis and so on. According to the experimental results, BHHP with hydroxyl group has better corrosion protection capacity on P110 steel in HCl than BHBP with biphenyl group, with the maximum efficiency reaching 95.67 % for BHBP, and 76.32 % for BHHP. Meanwhile, the results from quantum chemistry demonstrated that theoretically the hydroxyl spacer is superior to biphenyl spacer, which inspires the development of Gemini inhibitors.