Ionic solutions in perovskite solar cells (PSCs) have been demonstrated to significantly enhance their photoelectric performance serviced as interfacial passivation. In this study, the effect of ionic liquids with cations on the performance of PSCs was examined. By controlling the amount of cations introduced, lattice microstrains were minimized, the growth and stability of the crystal structure were promoted. Furthermore, adding organic anions also helped passivate grain boundaries and inhibit non-radiative processes, leading to further improvements in device performance. The incorporation of ionic-liquid dopants into the perovskite material resulted in the creation of devices with efficiency of 22.74%. Furthermore, devices retained their initial efficiency of 91% for 1000 h under conditions of 65 ± 5% relative humidity.