A variety of defects exist in the solution-processed polycrystalline perovskites, resulting in photovoltaic output losses and degradation. Chemical interaction is a promising way to realize the passivation of defects. Herein, cetyl pyridinium bromide (CPB) containing both pyridine units and long-chain alkyl groups was introduced in the perovskite precursor solution as a passivation agent. Experimental results show that pyridine unit in CPB formed coordination with uncoordinated Pb2+, which also interact with N–H in MAPbI3. Meanwhile, long-chain alkyl groups in CPB had interaction with MAI and PbI2 in MAPbI3. Thus, trace amount of CPB in the precursor solution improved the optoelectronic properties of perovskite films and suppressed non-radiative carrier recombination in perovskite solar cell (PSC). CPB-modified perovskite films exhibit a lower trap-state density and stronger carrier migration capability. It enables the significant enhancement of PCE values of the p-i-n structured PSC from 18.27 % to 20.53 %, accompanied by the improved stability. Our work exhibits more possibility between passivating additive and PSC performance.