Flexible perovskite solar cells (f-PSCs) show unique charm in the electronics industry due to their mechanical flexibility, portability, and compatibility with curved surfaces. However, severe interfacial defects and residual tensile strain remain pivotal limitations to their performance and stability. Here, a novel strategy using 4-amino-2-(trifluoromethyl) benzonitrile (ATMB) with multiple functional groups (−NH2, −CF3, and −C≡N) is proposed to modify the interface of perovskite/Spiro-OMeTAD, realizing significant improvements in both the efficiency and stability of PSCs. The comprehensive defect passivation effects of ATMB result in a great reduction of defect density on the surface and grain boundaries of perovskite films. Moreover, the introduction of ATMB as a top interface layer reduces the Young's modulus of perovskite films and then releases the residual stress. Furthermore, ATMB modification induces an upshift of the valence band of the perovskite, facilitating hole extraction. Consequently, the rigid PSC attained a best PCE of 22.46%, and the f-PSC achieved a best PCE of 21.42% with ATMB modification, significantly exceeding the PCEs of 20.32% and 19.01% of the control devices. Furthermore, combined with phytic acid (PA)-doped SnO2, PCEs of 23.04% and 21.66% were obtained for rigid and flexible PSCs, respectively. The humidity stability, light stability, and mechanical flexibility of the devices were obviously increased.