All-inorganic perovskite cesium lead halides with superior stability, suitable bandgap and high absorption efficient have become a promising candidate for photovoltaic application. In all-inorganic cesium lead halide perovskites, CsPb
X3 (
X = Br, I) exhibits excellent photoelectric properties, which are similar to those of organic-inorganic hybrid perovskites. The CsPbI
3 faces a challenge of unideal tolerant factor for perovskite phase while CsPbI
3–xBr
x has better tolerant factor. Among them, CsPbI
2Br is one of most popular candidates because of its good thermal stability. Nevertheless, CsPbI
2Br shows instability due to the phase transition caused by moisture and lower efficiency because of defects. For all inorganic perovskite devices, the alkyl chain length of surface treatment agent should be taken into account when using organic cationic passivation method. In this paper, CsPbI
2Br perovskite is treated with different organic ammonium salts to enhance its phase stability. The experimental results show that
α-phase CsPbI
2Br is more stable with the increase of the alkyl chain length. Butylamine iodine (BAI) among three kinds of surface treating agents is proved to have the best defect passivation and phase stabilization effect. With the increase of alkyl chain length, the hydrophobicity of the organic molecular layer increases, which plays a crucial role in protecting optically active CsPbI
2Br. Meanwhile, it is found that the stability of perovskite is enhanced with the concentration of the BAI solution increasing. This should be related to the organic cation termination formed on the surface of CsPbI
2Br film. Solar cell devices based on the CsPbI
2Br thin films treated with different concentrations of BAI are assembled and then the effect of organic ion surface treatment on the photoelectric performance of batteries is further explored. The experimental results show that when the concentration of BAI is relatively high (4 mg/mL and 8 mg/mL), the device’s photovoltaic performance decreases especially the photocurrent obviously decreases, while the post-treatment process using 2 mg/mL BAI will enhance not only the phase stability but also the photovoltaic parameters after defect passivation. Considering both humidity resistance and device efficiency, this work demonstrates that the CsPbI
2Br thin film with suitable BAI treatment can improve the wet stability of perovskite, and enhance the photovoltaic performance.