All-inorganic perovskite solar cells (PSCs) face challenges related to film inhomogeneity, which arises from nonideal crystallization. This issue significantly impedes the advancement of all-inorganic PSCs. In this study, we observed that during the crystallization process of CsPbI2Br, the Br-rich intermediate phase is often preferentially deposited, leading to an uneven distribution in the out-of-plane direction of the perovskite film. To address this issue, crown ether molecules (dibenzo-18-crown-6) were introduced into the perovskite precursor solution. The complexation of crown ether with Cs cations and Br anions optimizes the crystallization sequence of the perovskite, ensuring that the intermediate phase closely conforms to the standard stoichiometric ratio. This adjustment significantly mitigates the problem of uneven halogen ion distribution along the out-of-plane direction. Furthermore, the crown ether thermally decomposes during the high-temperature annealing process, thereby not affecting the composition of the final perovskite film. Following crown ether treatment, the efficiency of the PSCs reached 14.08%, and the unpackaged devices maintained 80% of their initial efficiency after 1000 h of exposure to light in an atmospheric environment.