Ionic liquids (ILs) can play a vital role in clay swelling inhibition during hydraulic fracturing. Previous studies highlighted the effect of side-chain length attached to the cationic core and different anions possessing almost the same chemical properties on inhibition performance. However, polyatomic anions have the potential to superiorly inhibit swelling compared to monoatomic anions. In this study, three ILs, namely, 1-butyl-3-methylimidazolium chloride (BMIMCl), 1-butyl-3-methylimidazolium tetrafluoroborate (BMIMBF4), and 1-butyl-3-methylimidazolium hexafluorophosphate (BMIMPF6), were utilized to assess the effects of polyatomic anions on clay swelling inhibition. These performances were compared with the performances of a conventional inhibitor, potassium chloride (KCl). X-ray diffraction (XRD) testing was applied to check the mineral components present in the bentonite clay sample studied in this research. Clay swelling inhibition performance and rheological properties of these ILs were evaluated by the bentonite plate soaking test, linear swelling test, and rheological test. The swelling inhibition mechanisms were investigated through ζ-potential measurement, Fourier transform infrared (FT-IR) spectroscopy, and contact angle measurement. Moreover, COSMO-RS computer simulation was conducted to explain the inhibition mechanisms theoretically. The results demonstrated that BMIMPF6 showed superior inhibition performance and reduced the swelling by 21.55%, while only 9.26% reduction was attained by potassium chloride (KCl). The adsorption ability on the bentonite surface through electrostatic attraction, higher activity coefficient, and less electronegativity of PF6– anion played a vital role in attaining such superior inhibition performance by BMIMPF6.